jira-290 cron job for expired task

This commit is contained in:
jain
2023-07-25 19:13:25 +05:30
parent 3cdd685ea8
commit 80843502a6
6 changed files with 33 additions and 3 deletions

View File

@ -32,3 +32,14 @@ app.autodiscover_tasks()
def debug_task(self):
""" celery debug task """
print(f'Request: {self.request!r}')
"""cron task"""
app.conf.beat_schedule = {
"expired_task": {
"task": "guardian.utils.update_expired_task_status",
"schedule": crontab(minute=0, hour=0),
},
}