我使用芹菜3.0.21和redis作为后端,这是我的芹菜配置:
celery = Celery('cpps',
broker='redis://127.0.0.1:6379/1',
backend='redis://127.0.0.1:6379/1',
include=['cpps.tasks'])
# Optional configuration, see the application user guide.
celery.conf.update(
CELERY_TASK_RESULT_EXPIRES=10800,
CELERYD_FORCE_EXECV=True,
BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 604800},
# CELERYD_STATE_DB='cppsstate',
default_exchange=Exchange('default', type='direct'),
CELERY_DEFAULT_QUEUE = 'default',
CELERY_DEFAULT_EXCHANGE_TYPE = 'direct',
CELERY_DEFAULT_ROUTING_KEY = 'default'
)
在执行了大约12个小时的一系列耗时工作后,我退出了代码1,有时是15,如下所示:
Restarting celeryd (cpps/celeryd.py worker -l debug -Q single_tasks --concurrency=1 -n single225)
[2013-12-03 09:15:43,535: DEBUG/MainProcess] Stopping celery.worker.consumer.Consumer...
[2013-12-03 09:15:43,536: DEBUG/MainProcess] consumer: Stopping consumers...
[2013-12-03 09:15:43,536: DEBUG/MainProcess] Stopping celery.worker.mediator.Mediator...
[2013-12-03 09:15:44,369: DEBUG/MainProcess] Stopping celery.concurrency.processes.TaskPool...
[2013-12-03 09:15:45,371: ERROR/MainProcess] Process 'PoolWorker-255' pid:23832 exited with exitcode 1
[2013-12-03 09:15:51,379: DEBUG/MainProcess] Stopping celery.worker.hub.Hub...
[2013-12-03 09:15:51,379: DEBUG/MainProcess] consumer: Closing consumer channel...
[2013-12-03 09:15:51,379: DEBUG/MainProcess] consumer: Closing broadcast channel...
[2013-12-03 09:15:51,382: DEBUG/MainProcess] consumer: Closing broker connection...
Restoring 4 unacknowledged message(s).
-------------- celery@single225 v3.0.21 (Chiastic Slide)
---- **** -----
--- * *** * -- Linux-3.2.0-48-generic-x86_64-with-Ubuntu-12.04-precise
-- * - **** ---
- ** ---------- [config]
- ** ---------- .> broker: redis://192.168.11.226:6379/1
- ** ---------- .> app: cpps:0x11d8b10
- ** ---------- .> concurrency: 1 (processes)
- *** --- * --- .> events: OFF (enable -E to monitor this worker)
-- ******* ----
--- ***** ----- [queues]
-------------- .> single_tasks: exchange:single(direct) binding:single
有人可以告诉我这是什么问题吗? exitcode 1到底意味着什么?我无法从网站上找到官方文档。