Closed Hoffs closed 5 years ago
Well so I did more digging today and it seems it might have been somewhat related to deleting the task rather than disabling it. Changed that to only edit already existing task and now... Even worse. It seems that the tasks don't get updated in beat scheduler after I modify their objects in Django. See picture: Between updates the enabled flag is still false, yet the tasks get executed:
2017-02-22T11:41:12.809197+00:00 app[worker1.1]: [2017-02-22 11:41:12,808: DEBUG/Beat] beat: Waking up in 4.93 seconds.
2017-02-22T11:41:17.765244+00:00 app[worker1.1]: [2017-02-22 11:41:17,764: INFO/Beat] Scheduler: Sending due task Collecting statistics (twitch_stats.tasks.get_all_stats)
2017-02-22T11:41:17.766246+00:00 app[worker1.1]: [2017-02-22 11:41:17,766: DEBUG/Beat] twitch_stats.tasks.get_all_stats sent. id->2bdb0223-bae9-476e-ae18-9175e07586b8
By restarting the worker process I can get the tasks to update, but if I change anything to them during runtime it is not being applied or rather applied in beat worker.
So it seems this is the issue I am having... https://github.com/celery/django-celery-beat/issues/7
Installing latest django-celery-beat version from this repo didn't seem to help, but https://github.com/HealthTechDevelopers/celery@master seemed to help. Now scheduler seems to be updating fine.
2017-02-22T19:51:01.799004+00:00 app[worker1.1]: [2017-02-22 19:51:01,798: INFO/Beat] DatabaseScheduler: Schedule changed.
2017-02-22T19:51:01.799130+00:00 app[worker1.1]: [2017-02-22 19:51:01,799: INFO/Beat] Writing entries...
I have the same problem when I edit a periodic task from the django admin interface. I need to restart everything to fix the problem
same problem here :( no fixes ?
same here
Indeed this looks like https://github.com/celery/django-celery-beat/issues/7
Same here. I checked #7 feed and it seems that the problem is not completely solved.
I've also done some digging the ONLY way I've found to get it back to normal is to remove all periodic tasks and restart celery beat
.
For me that looks like this.
celery -A <APPNAME> worker --events -B -S django -l debug
celery -A <APPNAME> events -l debug --camera django_celery_monitor.camera.Camera --frequency=2
same here
No idea what is going on. But when I ran two beats and a single worker which doesn't make any sense to me, one of the beat processes started to send periodic tasks.
One beat process gets stuck
Waking up in 4.99 seconds.
While the other says
Waking up in 5.00 seconds.
Then sends the task to the queue which is then picked up by the worker.
Celery installed as such
pip install git+https://github.com/celery/celery.git#egg=celery
Versions
django-celery-beat (1.0.1)
celery (4.0.2)
Django (1.10.1)
I have the same problem when I edit a periodic task from the django admin interface. I need to restart everything to fix the problem
How can I fix it?
whats the result with 1.4.0 release?
So I have been trying to setup celery for quite a few hours and after some time I sort of managed to get it working. Now the part that I am currently stuck is that the scheduled tasks from beat aren't getting executed by celery workers. It seems that they aren't actually being sent to beat? The PeriodicTask objects are getting creating, but not executed.
Celery starts up fine by using:
Task get created fine
But the beat doesn't recognize