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
Use the jobs actual scheduled time #276
base: master
Are you sure you want to change the base?
Use the jobs actual scheduled time #276
Conversation
Rufus calls back into sidekiq-scheduler with time being now instead of when the job is supposed to run.
The Rufus and Fugit libraries use EtOrbi::EoTime which isn't compatible with ActiveSupports patches to Time.
Hi, We faced the same issue with a job using the "cron" type. The job was executed on several hosts because the From what I understand, the fix from this PR would solve this issue because instead of using the time when the job got cleared for triggering (which can be different), we'd use the time where the job was scheduled to be run at (which would be the same). Do you see any flaw in this logic? Is something preventing the merge, and if so, would you be willing to merge it if we fix the points you deem necessary? Thanks for considering this request 🙂 |
Bump version.
@afrase Are you still interested in working on this? |
hey @afrase @FabienChaynes I plan to add this fix to the V4 release, I think we won't be able to merge these changes due to the conflicts. I will open a new PR with @afrase as Co-Author or @afrase if you are willing to fix the conflicts of this PR, go ahead. @FabienChaynes Let me know if you're still waiting for this issue to be fixed, it would be good to have someone to test it in production once merged before we make the official release of v4 |
Hi @marcelolx and thanks for the follow up. We made some changes to reduce the number of jobs scheduled at the same time (thus decreasing the load) and never encountered the problem again. |
Rufus calls the block with the current time instead of the time the job is scheduled to run. If you have multiple hosts, it's possible that Rufus will run the block at slightly different times. This results in a job getting ran multiple times.
This figures out when the job was scheduled to run instead of the time rufus sends. Doing this will fix #181