-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Ideas for improvements to Cron #392
Comments
Noting that there is a way for the adapter to pass back errors on enqueue: Thinking about that in the context of adding unique index and handling failed uniqueness exceptions. |
Another idea is to have a An option to disable Cron jobs from the web interface is also useful since it allows quick intervention when a job is misbehaving without taking down everything. These two and being able to run Cron tasks immediately (as mentioned in #425) are available in sidekiq-cron A minor nitpick is, at least for me |
@ssendev strong agree! Thank you for suggesting. Disabling cron globally isn't easily done (yet... GoodJob doesn't have any global configuration in the database right now). Adding the option to run a cron task immediately is very doable. And thanks for the UI feedback. I'm thinking of just showing the Name, schedule, and then putting all the configuration params in an expandable toggle. That should free up some space. |
Some ideas for improving Cron:
cron_at
column, along with a uniqueness validation oncron_key, cron_at
. This would push down to the database the largest source of enqueue concurrency conflicts, and provide a better guarantee (I don't know of anyone who is using intending Cron to enqueue multiple identical jobs from multiple workers at the same point in time)CronEntry
class that has.all
,.find(cron_key)
methods, and instance accessors for the cron configuration values, and encapsulate thenext_at
andenqueue
logic in methods too. I think that might dry up the code (or at least avoid primitive abuse as we're doing more and more with the cron configuration hashes), as well as allow us to use some niceties likedom_id
instead of callingto_param
on the strings in the Dashboard.args
parameter is not bulletproof across different combinations of positional args and kwargs and Ruby versions. (I would love some help on this one).The text was updated successfully, but these errors were encountered: