Celery beat with method tasks not working

后端 未结 1 1253
情歌与酒
情歌与酒 2021-01-15 01:57

I\'m trying to run celerybeat on a method task, and can\'t get anything to work out properly. Here\'s an example setup:

from celery.contrib.methods import t         


        
1条回答
  •  北恋
    北恋 (楼主)
    2021-01-15 02:09

    The problem is that Celerybeat will not instantiate X before calling the method. The task_method filter defaults to calling the unbound method if the method is not bound to an object.

    My question is, what are you trying to accomplish here? X has no state, so why not use a module-evel function?

    0 讨论(0)
提交回复
热议问题