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

Reschedule job in current queue #79

Open
iamtheschmitzer opened this issue Oct 26, 2023 · 1 comment
Open

Reschedule job in current queue #79

iamtheschmitzer opened this issue Oct 26, 2023 · 1 comment

Comments

@iamtheschmitzer
Copy link

Inside my Faktory::Job, am attempting to reschedule the current job (same options) in the future.

  def reschedule_job(options)
    self.class.perform_in(RESCHEDULE_DELAY_DURATION, options)
  end

But this reschedules in the default queue. I would like to reschedule in the same queue if possible, but I haven't found out how to determine the current queue (my job could be enqueued in multiple queues).

Is there a way for my job to know queue that the job was dequeued from?

Thanks In advance

@mperham
Copy link
Contributor

mperham commented Oct 26, 2023

Jobs, by design, only have access to their arguments. You’d need to pass in the queue as an argument.

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

2 participants