2012-06-30 10 views
4

병이있는 프로젝트를 만들고 있는데 주기적으로 일정이 잡힌 작업을 실행해야합니다.Celerybeat가 예상대로 작동하지 않습니다.

나는 rabbitmq + celery로 가기로 결정 했으므로 예약 된 작업을 프로그래밍 방식으로 관리하는 가장 완벽한 방법 인 &처럼 보였습니다.

나는 rabbitmq와 셀러리를 모두 설치했으며 celeryd -B를 사용하면 작업이 정상적으로 완료됩니다. 그러나 Celerybeat 명령을 사용하면 작업이 "전송"됩니다 (또는 출력이 나와서 celeryd와 celerybeat를 -l 디버그 옵션과 함께 실행하면 더 자세한 정보가 표시됨). 그러나 정기적으로 "전송"되고 있지만 돈이 없습니다. (테스트 목적으로, 태스크는 60 초마다 파일에 현재 시간 소인을 첨부해야합니다). 어쨌든, 같은 디렉토리에있는 celeryd -B 명령이 정상적으로 작동하기 때문에 다른 모든 작업이 제대로 작동합니다. 예상되는 간격으로 파일을 씁니다.

내가 누락 된 항목이 있습니까? ,

[2012-06-30 18:07:44,676: WARNING/MainProcess] celerybeat v2.5.5 is starting. 
[2012-06-30 18:07:44,750: WARNING/MainProcess] __ - ... __ -  _ 
Configuration -> 
    . broker -> amqp://[email protected]:5672// 
    . loader -> celery.loaders.default.Loader 
    . scheduler -> celery.beat.PersistentScheduler 
    . db -> celerybeat-schedule 
    . logfile -> [stderr]@DEBUG 
    . maxinterval -> 5.00 minutes (300s) 
[2012-06-30 18:07:44,751: DEBUG/MainProcess] Setting default socket timeout to 30 
[2012-06-30 18:07:44,751: INFO/MainProcess] Celerybeat: Starting... 
[2012-06-30 18:07:44,776: DEBUG/MainProcess] Current schedule: 
<Entry: celery.backend_cleanup celery.backend_cleanup() {<crontab: 0 4 * (m/h/d)>} 
<Entry: often tasks.output() {<freq: 1.00 minute>} 
[2012-06-30 18:07:44,776: DEBUG/MainProcess] Celerybeat: Ticking with max interval->5.00 minutes 
[2012-06-30 18:07:44,781: DEBUG/MainProcess] Start from server, version: 8.0, properties: {u'information': u'Licensed under the MPL. See http://www.rabbitmq.com/', u'product': u'RabbitMQ', u'copyright': u'Copyright (C) 2007-2012 VMware, Inc.', u'capabilities': {}, u'platform': u'Erlang/OTP', u'version': u'2.8.4'}, mechanisms: [u'PLAIN', u'AMQPLAIN'], locales: [u'en_US'] 
[2012-06-30 18:07:44,785: DEBUG/MainProcess] Open OK! known_hosts [] 
[2012-06-30 18:07:44,787: DEBUG/MainProcess] using channel_id: 1 
[2012-06-30 18:07:44,789: DEBUG/MainProcess] Channel open 
[2012-06-30 18:07:44,790: INFO/MainProcess] Scheduler: Sending due task tasks.output 
[2012-06-30 18:07:44,794: DEBUG/MainProcess] Celerybeat: Synchronizing schedule... 
[2012-06-30 18:07:44,838: DEBUG/MainProcess] tasks.output sent. id->53951ab0-022d-40a5-9f56-9a4a294294c7 
[2012-06-30 18:07:44,838: DEBUG/MainProcess] Celerybeat: Waking up in 1.00 minute. 
+0

감사 세부 사항에주의, @Taras을 위해. 어쨌든, 이것에 대한 대답은 apellyly 셀러리 비트가 병렬 celeryd 프로세스가 필요하다는 것입니다. 누군가가 잘못 생각하면 답변을 추가하십시오. –

+0

맞습니다. 셀러리 비트는 celerd가 선택하여 실제로 실행하는 작업을 예약합니다. 후속 조치 주셔서 감사합니다 @toninoj – Taras

답변

0

Celerybeat, 그 자체로 단순히 소비하는 다른 사람에 대한 적절한 큐에 시간과 삽 작업을 계속 : 여기

는 -l 디버그 celerybeat $의 출력입니다.

인체 공학적, 당신이 처리 할 큐 (들)을 듣고 celeryd 프로세스를 시작 :

$ celeryd <queuename> -l DEBUG 
관련 문제