How do I enable remote celery debugging in PyCharm?

前端 未结 8 1065
-上瘾入骨i
-上瘾入骨i 2020-12-23 21:11

I\'m trying to find some instructions on how to enable PyCharm debugging within my celery processes on a remote machine. The remote machine is running Ubuntu 14.04.

8条回答
  •  臣服心动
    2020-12-23 21:41

    Just add the following config:

    from celery import current_app
    current_app.conf.CELERY_ALWAYS_EAGER = True
    current_app.conf.CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
    

    Doing so makes celery execute in the same thread as the currently executing thread.

提交回复
热议问题