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

Disabling a single task in the MongoDB collection seems to disable all tasks

Open dmorina opened this issue 4 years ago • 2 comments

I set the enabled field to false for one of the tasks and that resulted in all tasks not being scheduled anymore. The issue resolves once you set the enabled flag to true.

dmorina avatar Feb 25 '22 20:02 dmorina

Yeah, I encountered same problem too.

FurkanSalih avatar Jun 07 '22 19:06 FurkanSalih

Encountered the problem and fixed the issue by patching Mongoscheduler.get_from_database

self.sync()
d = {}
for doc in self.Model.objects():
    if doc.enabled:
        d[doc.name] = self.Entry(doc)
return d

Jerkka avatar Apr 25 '24 09:04 Jerkka