Duplicated tasks after time change

风格不统一 提交于 2019-12-11 00:53:24

问题


I don't know exactly why, but I am getting duplicated tasks. I thing this may be related with time change of the last weekend (The clock was delayed for an hour in the system).

The first task should not be executed, since I say explicitly hour=2. Any idea why this happens?

[2017-11-01 01:00:00,001: INFO/Beat] Scheduler: Sending due task every-first-day_month (app.users.views.websites_down)
[2017-11-01 02:00:00,007: INFO/Beat] Scheduler: Sending due task every-first-day_month (app.users.views.websites_down)

from celery.schedules import crontab

CELERYBEAT_SCHEDULE = {
    'every-first-day_month': {
        'task': 'app.users.views.websites_down',
        'schedule': crontab(hour=2, minute=0, day_of_month=1),
    }
}

CELERY_TIMEZONE = "Europe/Lisbon"

来源:https://stackoverflow.com/questions/47057983/duplicated-tasks-after-time-change

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!