Почему планировщик ударов celery продолжает работать после истечения срока действия в django celery
PeriodicTask.objects.create(
interval=interval,
crontab=crontab,
clocked=clocked,
name=data["name"],
task=data["task"], # dropdown
args=json.dumps(json.loads(data["args"])),
one_off=True if schedule_type == "clocked" else False,
expires=datetime.strptime(data["expires"], '%Y-%m-%d %H:%M:%S.%f') if data["expires"] else None
)
- все еще работает после установленного времени истечения
- она не вызывает функцию, а бьет рабочую
ex: в рабочем терминале
[2024-07-22 07:06:16,334: INFO/MainProcess] Task test[390404a1-9814-4208-85a2-6e1269bc09d9] received
[2024-07-22 07:06:16,334: INFO/MainProcess] Discarding revoked task: test[390404a1-9814-4208-85a2-6e1269bc09d9]
и в сельдерее бить терминал
[2024-07-22 07:06:16,327: WARNING/MainProcess] 390404a1-9814-4208-85a2-6e1269bc09d9 has an expiration date in the past (16.325898s ago).
We assume this is intended and so we have set the expiration date to 0 instead.
According to RabbitMQ's documentation:
"Setting the TTL to 0 causes messages to be expired upon reaching a queue unless they can be delivered to a consumer immediately."
If this was unintended, please check the code which published this task.```