Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Cancel job" request fails if the job queued in a different queue #685

Open
kapcod opened this issue Nov 12, 2019 · 0 comments
Open

"Cancel job" request fails if the job queued in a different queue #685

kapcod opened this issue Nov 12, 2019 · 0 comments

Comments

@kapcod
Copy link

kapcod commented Nov 12, 2019

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.

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

No branches or pull requests

1 participant