我有一项任务,但任务很长(约30米)。当我重新开始时,芹菜首先执行任务,但随后发送任务但不启动进程。我使用芹菜cron(" beat")来运行计划任务。 对于后端和代理使用PostgreSql + SqlAlchemy 运行线:
celery multi start worker1 -A schedule.celery -B -l debug -Ofair --logfile=$OPENSHIFT_LOG_DIR"celery.log";
Task schedule.parse[2042ca6e-2ddd-4429-86f6-43661ffe3f0c] succeeded in 1754.24650295s: None
[2016-07-12 14:10:00,341: DEBUG/Beat] beat: Synchronizing schedule...
[2016-07-12 14:10:00,344: DEBUG/Beat] beat: Waking up in 5.00 minutes.
[2016-07-12 14:15:00,435: DEBUG/Beat] beat: Synchronizing schedule...
[2016-07-12 14:15:00,445: DEBUG/Beat] beat: Waking up in 5.00 minutes.
[2016-07-12 14:20:00,535: DEBUG/Beat] beat: Synchronizing schedule...
[2016-07-12 14:20:00,538: DEBUG/Beat] beat: Waking up in 5.00 minutes.
[2016-07-12 14:25:00,630: DEBUG/Beat] beat: Synchronizing schedule...
[2016-07-12 14:25:00,652: DEBUG/Beat] beat: Waking up in 5.00 minutes.
[2016-07-12 14:30:00,742: DEBUG/Beat] beat: Synchronizing schedule...
[2016-07-12 14:30:00,747: DEBUG/Beat] beat: Waking up in 5.00 minutes.
[2016-07-12 14:35:00,837: DEBUG/Beat] beat: Synchronizing schedule...
[2016-07-12 14:35:00,842: DEBUG/Beat] beat: Waking up in 4.99 minutes.
[2016-07-12 14:40:00,090: DEBUG/Beat] beat: Synchronizing schedule...
[2016-07-12 14:40:00,094: INFO/Beat] Scheduler: Sending due task every-day (schedule.parse)
[2016-07-12 14:40:00,109: DEBUG/Beat] schedule.parse sent. id->116e8ef5-84d0-4f01-adad-d52813de9ce9
[2016-07-12 14:40:00,110: DEBUG/Beat] beat: Waking up in 5.00 minutes.
[2016-07-12 14:40:00,864: INFO/MainProcess] Received task: schedule.parse[116e8ef5-84d0-4f01-adad-d52813de9ce9]
[2016-07-12 14:40:00,864: DEBUG/MainProcess] TaskPool: Apply <function _fast_trace_task at 0x7f6c0a45d398> (args:('schedule.parse', '116e8ef5-84d0-4f01-adad-d52813de9ce9', [], {}, {'utc': True, u'is_eager': False, 'chord': None, u'group': None, 'args': [], 'retries': 0, u'delivery_info': {u'priority': 0, u'redelivered': None, u'routing_key': u'celery', u'exchange': u'celery'}, 'expires': None, u'hostname': 'worker1@ex-std-node59.prod.rhcloud.com', 'task': 'schedule.parse', 'callbacks': None, u'correlation_id': u'116e8ef5-84d0-4f01-adad-d52813de9ce9', 'errbacks': None, 'timelimit': (None, None), 'taskset': None, 'kwargs': {}, 'eta': None, u'reply_to': u'0a27f322-a0da-3ce2-bae0-b8b3389ea88c', 'id': '116e8ef5-84d0-4f01-adad-d52813de9ce9', u'headers': {}}) kwargs:{})
[2016-07-12 14:40:00,883: DEBUG/MainProcess] Task accepted: schedule.parse[116e8ef5-84d0-4f01-adad-d52813de9ce9] pid:60002
[2016-07-12 14:45:00,201: DEBUG/Beat] beat: Synchronizing schedule...
[2016-07-12 14:45:00,204: DEBUG/Beat] beat: Waking up in 5.00 minutes.
[2016-07-12 14:50:00,295: DEBUG/Beat] beat: Synchronizing schedule...
[2016-07-12 14:50:00,298: DEBUG/Beat] beat: Waking up in 5.00 minutes.
[2016-07-12 14:55:00,388: DEBUG/Beat] beat: Synchronizing schedule...
[2016-07-12 14:55:00,392: DEBUG/Beat] beat: Waking up in 4.99 minutes.
[2016-07-12 15:00:00,090: DEBUG/Beat] beat: Synchronizing schedule...
[2016-07-12 15:00:00,094: INFO/Beat] Scheduler: Sending due task every-day (schedule.parse)
[2016-07-12 15:00:00,103: DEBUG/Beat] schedule.parse sent. id->c05905a0-0671-4f49-a045-f26d442cebbc
[2016-07-12 15:00:00,104: DEBUG/Beat] beat: Waking up in 5.00 minutes.
[2016-07-12 15:00:00,167: INFO/MainProcess] Received task: schedule.parse[c05905a0-0671-4f49-a045-f26d442cebbc]
[2016-07-12 15:00:00,168: DEBUG/MainProcess] TaskPool: Apply <function _fast_trace_task at 0x7f6c0a45d398> (args:('schedule.parse', 'c05905a0-0671-4f49-a045-f26d442cebbc', [], {}, {'utc': True, u'is_eager': False, 'chord': None, u'group': None, 'args': [], 'retries': 0, u'delivery_info': {u'priority': 0, u'redelivered': None, u'routing_key': u'celery', u'exchange': u'celery'}, 'expires': None, u'hostname': 'worker1@ex-std-node59.prod.rhcloud.com', 'task': 'schedule.parse', 'callbacks': None, u'correlation_id': u'c05905a0-0671-4f49-a045-f26d442cebbc', 'errbacks': None, 'timelimit': (None, None), 'taskset': None, 'kwargs': {}, 'eta': None, u'reply_to': u'0a27f322-a0da-3ce2-bae0-b8b3389ea88c', 'id': 'c05905a0-0671-4f49-a045-f26d442cebbc', u'headers': {}}) kwargs:{})
[2016-07-12 15:00:00,196: DEBUG/MainProcess] Task accepted: schedule.parse[c05905a0-0671-4f49-a045-f26d442cebbc] pid:60004