celerybeat-mongo icon indicating copy to clipboard operation
celerybeat-mongo copied to clipboard

run_immediately doesn't :)

Open P-T-I opened this issue 5 years ago • 6 comments

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.

P-T-I avatar May 18 '20 20:05 P-T-I

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.

rafaelreuber avatar May 20 '20 20:05 rafaelreuber

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...

P-T-I avatar May 21 '20 12:05 P-T-I

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

rafaelreuber avatar May 21 '20 13:05 rafaelreuber

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

P-T-I avatar May 21 '20 14:05 P-T-I

@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...

P-T-I avatar May 23 '20 19:05 P-T-I

@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.

FlorianPfisterer avatar Feb 04 '22 15:02 FlorianPfisterer