resque / resque/resque-scheduler
"Cancel job" request fails if the job queued in a different queue
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1.7k
- Forks
- 477
- PR merge metrics
- No merged PRs in 30d
Description
delayed_cancel_now calls Resque.remove_delayed_job_from_timestamp which expects the job to be queued in the queue that defined in the job class.
But it's not always the case. In our codebase, we sometimes don't define queues at all and either defining the queue in resque_scheduler.yml or Resque.enqueue_at_with_queue.
I suggest showing "queue" column in the delayed jobs search result, passing the queue as a parameter to /delayed/cancel_now and using job_to_hash_with_queue to encode the job.
This will also help it deal with constants that are not autoloaded and dependent on Rails lazy load.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing delayed_cancel_now and Resque.remove_delayed_job_from_timestamp, then inspect the delayed jobs search result and job_to_hash_with_queue. Done means the result exposes the queue, /delayed/cancel_now accepts it, cancellation works for jobs queued elsewhere, and constants that are not autoloaded remain supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100