You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I love this gem, thank you.
I have a use case where when a job is enqueued I'd like to keep pushing back the time of a scheduled job until it is executed without being re-requested.
ie.
job is scheduled to run in 1 hour.
before that job runs it is re-requested
I'd like to either push it back to 1 hour from the new request, or, drop it and schedule a new one in 1 hour.
Perhaps I could do this with context to the job that was locking out the requested job? unique :until_executed, on_conflict: ->(job, locked_job) { locked_job.drop(); job.enqueue(wait: 1.hour) }
or unique :until_executed, on_conflict: ->(job, locked_job) { locked_job.reenque(wait: 1.hour) }
Any advice on how to best do this?
The text was updated successfully, but these errors were encountered:
Hello, I love this gem, thank you.
I have a use case where when a job is enqueued I'd like to keep pushing back the time of a scheduled job until it is executed without being re-requested.
ie.
Perhaps I could do this with context to the job that was locking out the requested job?
unique :until_executed, on_conflict: ->(job, locked_job) { locked_job.drop(); job.enqueue(wait: 1.hour) }
or
unique :until_executed, on_conflict: ->(job, locked_job) { locked_job.reenque(wait: 1.hour) }
Any advice on how to best do this?
The text was updated successfully, but these errors were encountered: