带有django2.0的Django-celery在具有主管的生产环境中继续发送任务,但未完成

时间:2018-06-26 12:41:44

标签: python django celery django-celery celeryd

这些是我的django芹菜日志的最后100行,似乎没有工作在执行。

[2018-06-26 10:42:57,286: INFO/Beat] Writing entries (1)...
[2018-06-26 10:42:57,388: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 10:43:57,405: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 10:44:57,421: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 10:45:57,417: INFO/Beat] Writing entries (1)...
[2018-06-26 10:45:57,448: INFO/Beat] DatabaseScheduler: Schedule changed.
[2018-06-26 10:45:57,449: INFO/Beat] Writing entries (0)...
[2018-06-26 10:45:57,642: INFO/Beat] DatabaseScheduler: Schedule changed.
[2018-06-26 10:45:57,643: INFO/Beat] Writing entries (0)...
[2018-06-26 10:46:56,207: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 10:47:56,223: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 10:48:56,238: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 10:49:01,319: INFO/Beat] Writing entries (1)...
[2018-06-26 10:49:56,253: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 10:50:21,415: INFO/Beat] DatabaseScheduler: Schedule changed.
[2018-06-26 10:50:21,416: INFO/Beat] Writing entries (1)...
[2018-06-26 10:50:56,268: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 10:51:56,285: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 10:52:06,385: INFO/Beat] Writing entries (1)...
[2018-06-26 10:52:56,300: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 10:53:56,317: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 10:54:56,334: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 10:55:11,445: INFO/Beat] Writing entries (1)...
[2018-06-26 10:55:56,349: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 10:56:56,366: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 10:57:56,381: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 10:58:16,500: INFO/Beat] Writing entries (1)...
[2018-06-26 10:58:56,397: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 10:59:56,411: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:00:56,426: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:01:21,565: INFO/Beat] Writing entries (1)...
[2018-06-26 11:01:56,444: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:02:56,460: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:03:56,476: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:04:26,635: INFO/Beat] Writing entries (1)...
[2018-06-26 11:04:56,490: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:05:56,506: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:06:56,521: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:07:31,693: INFO/Beat] Writing entries (1)...
[2018-06-26 11:07:56,537: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:08:56,553: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:09:16,699: INFO/Beat] DatabaseScheduler: Schedule changed.
[2018-06-26 11:09:16,700: INFO/Beat] Writing entries (1)...
[2018-06-26 11:09:56,571: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:10:36,762: INFO/Beat] Writing entries (1)...
[2018-06-26 11:10:56,587: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:11:56,602: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:12:56,616: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:13:36,866: INFO/Beat] Writing entries (1)...
[2018-06-26 11:13:56,631: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:14:56,646: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:15:56,663: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:16:41,870: INFO/Beat] Writing entries (1)...
[2018-06-26 11:16:56,678: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:17:56,694: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:18:16,836: INFO/Beat] DatabaseScheduler: Schedule changed.
[2018-06-26 11:18:16,837: INFO/Beat] Writing entries (1)...
[2018-06-26 11:18:21,989: INFO/Beat] DatabaseScheduler: Schedule changed.
[2018-06-26 11:18:21,990: INFO/Beat] Writing entries (0)...
[2018-06-26 11:18:56,710: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:19:46,929: INFO/Beat] Writing entries (1)...
[2018-06-26 11:19:56,726: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:20:56,742: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:21:56,758: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:22:51,990: INFO/Beat] Writing entries (1)...
[2018-06-26 11:22:56,774: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:23:56,789: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:24:06,901: INFO/Beat] DatabaseScheduler: Schedule changed.
[2018-06-26 11:24:06,902: INFO/Beat] Writing entries (1)...
[2018-06-26 11:24:56,804: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:25:56,801: INFO/Beat] Writing entries (1)...
[2018-06-26 11:25:56,906: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:26:56,922: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:27:56,938: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:28:56,934: INFO/Beat] Writing entries (1)...
[2018-06-26 11:28:57,042: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:29:57,058: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:30:57,074: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:31:57,071: INFO/Beat] Writing entries (1)...
[2018-06-26 11:31:57,171: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:32:57,185: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:33:57,200: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:34:57,196: INFO/Beat] Writing entries (1)...
[2018-06-26 11:34:57,295: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:35:57,310: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:36:57,326: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:37:57,322: INFO/Beat] Writing entries (1)...
[2018-06-26 11:37:57,422: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:38:57,437: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:39:57,452: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:40:57,447: INFO/Beat] Writing entries (1)...
[2018-06-26 11:40:57,546: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:41:57,562: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:42:57,577: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:43:47,801: INFO/Beat] DatabaseScheduler: Schedule changed.
[2018-06-26 11:43:47,801: INFO/Beat] Writing entries (1)...
[2018-06-26 11:43:57,573: INFO/Beat] Writing entries (0)...
[2018-06-26 11:43:57,594: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:44:57,610: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)
[2018-06-26 11:45:57,627: INFO/Beat] Scheduler: Sending due task save_fullstory (get_articles.tasks.save_stories)

为什么显示计划表一次又一次更改。我的django应用设置为:

    TIME_ZONE = 'UTC'
    CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler'
    CELERY_TIMEZONE = 'UTC'
    CELERY_ENABLE_UTC = True

通过此设置,django-celery在生产中工作了几个小时,我可以看到任务已完成。但是有时候这就是日志的样子。请任何有线索或较早遇到此问题的人帮忙。

该项目的规格为:

django==2.0,
django-celery==3.2.2,
celery==3.1.26,
kombu==3.0.37, 

0 个答案:

没有答案