Bug: Celery PeriodicTask spawns expired tasks
Celery PeriodicTasks are currently spawned with expires=timezone.now() + timedelta(minutes=600)
This means that after 10 hours tasks will still spawn but with a message saying that the task has expired so it is discarded (not executed).
To avoid this, we can set the expiration to a timedelta, because the original intention for expiration was if there is a backlog in the queue then the workers should not execute the same tasks multiple times when finally picking tasks from the queue only the latest one.
Setting expire_seconds to the interval seconds source
The original issue was that the AM queue limit was set to 2 days in prod, but the tasks were expired after 10 hours.
Edited by Panna Georgina Liptak