zmap / celerybeat-mongo

A Celery Beat Scheduler that uses MongoDB to store both schedule definitions and status information
Apache License 2.0
126 stars 43 forks source link

run_immediately doesn't :) #58

Open P-T-I opened 4 years ago

P-T-I commented 4 years ago

Setting the boolean field run_immediately from false to true does not start the task at all. The only thing I see is that after I set the field to 'true' that several seconds later the run_immediately field is set back to 'false'. Logs show no task activity, the task involved is not started directly; it only follows the configured crontab schedule.

rafaelreuber commented 4 years ago

Only celerybeat-mongo have such feature. I have checked the others ones (django-celery-beat and redbeat). I think this not so much useful. It's so easy to run task immediately.

P-T-I commented 4 years ago

I agree it is trivial however in the is_due method there are checks made for that specific setting so I reconned there should be a supported functionality behind, and if that’s the case; it’s not working...

rafaelreuber commented 4 years ago

You are right, if the feature is available, it must work perfectly!

P-T-I commented 4 years ago

Can you have a look at it, or shall I?

P-T-I commented 4 years ago

@rafaelreuber, I’ve taken a look at this particular issue, looks like the functionality only works when (re)starting the daemon. Then and only then it sees documents with the “run_immediately” set to true, all “is_due” cycles after that it never rechecks the “run_immediately” set in the database...

FlorianPfisterer commented 2 years ago

@rafaelreuber Can you provide some hints on how to solve this? I'm happy to make a PR, but I'm not sure where to start.