I'm using celery inside a django project, i have a celery scheduled task that run every minute and check inside a db if there is a new task to start, and also the task configured has a time start and duration.
The job of this periodic task is:
- Start a new async task if there is a newone configured. (task.delay(...))
- Check if a task previous started is running
- Stop task that exceed its duration (app.control.revoke(...))
- .... and other stuff...
But the question is: What is the "best practice" to monitor the status of started async task inside a periodic task?
I mean everytime the sceduled task run, i get from DB all the configured task (started, to start....) but i don't have the related celery task id associated to it, should i store celery task id inside db, to have the db task associated to the related task celery running?
Could django-celery help me?
Thanks.