Celery Received unregistered task of type (run example)

后端 未结 30 1869
旧时难觅i
旧时难觅i 2020-11-28 04:42

I\'m trying to run example from Celery documentation.

I run: celeryd --loglevel=INFO

/usr/local/lib/python2.7/dist-packages/celery/loade         


        
30条回答
  •  再見小時候
    2020-11-28 05:06

    Using --settings did not work for me. I had to use the following to get it all to work:

    celery --config=celeryconfig --loglevel=INFO
    

    Here is the celeryconfig file that has the CELERY_IMPORTS added:

    # Celery configuration file
    BROKER_URL = 'amqp://'
    CELERY_RESULT_BACKEND = 'amqp://'
    
    CELERY_TASK_SERIALIZER = 'json'
    CELERY_RESULT_SERIALIZER = 'json'
    CELERY_TIMEZONE = 'America/Los_Angeles'
    CELERY_ENABLE_UTC = True
    
    CELERY_IMPORTS = ("tasks",)
    

    My setup was a little bit more tricky because I'm using supervisor to launch celery as a daemon.

提交回复
热议问题