Skip to content

Add unique job deletion by ID or job value - #134

Merged
reneklacan merged 3 commits into
mainfrom
reneklacan/list-public-oxana-fns
Aug 11, 2026
Merged

Add unique job deletion by ID or job value#134
reneklacan merged 3 commits into
mainfrom
reneklacan/list-public-oxana-fns

Conversation

@reneklacan

@reneklacan reneklacan commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

  • add Storage::delete_unique_job for JobId and typed Job inputs
  • centralize deterministic unique job ID construction behind UniqueJobId
  • atomically remove deleted jobs from waiting queues, scheduled jobs, retries, and current-process tracking
  • cover ID deletion, typed job deletion, non-unique rejection, and safe re-enqueueing from every pending state

Verification

  • cargo fmt --all -- --check
  • cargo clippy --all-features --workspace --all-targets -- -D warnings
  • cargo test --all-features --workspace (208 passed, 3 ignored)

Note

Medium Risk
Touches Redis job-deletion paths used for queue/schedule/retry membership, so incomplete cleanup could leave stale unique-job state. Changes are narrowly scoped and covered by new integration tests.

Overview
Adds Storage::delete_unique_job, so callers can cancel a unique job by either its JobId or a typed Job value without manually reconstructing the deterministic ID.

Introduces a shared UniqueJobId trait that centralizes {job_name}/{unique_id} resolution, and wires envelope creation through it.

Also hardens delete_job to atomically clear membership from waiting queues, the schedule set, retries, and the current processing list—including corrupt payloads—so deleted unique jobs can be safely re-enqueued from any pending state.

Reviewed by Cursor Bugbot for commit a734f18. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread oxana/src/storage.rs
Comment thread oxana/src/storage_internal.rs

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a734f18. Configure here.

Comment thread oxana/src/storage_internal.rs
@reneklacan
reneklacan merged commit 2915c7d into main Aug 11, 2026
2 checks passed
@reneklacan
reneklacan deleted the reneklacan/list-public-oxana-fns branch August 11, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant