Problems with the new style celery api
问题 I have a class that extends celerys Task . It runs just fine with the old style API, but I am having problems converting it to the new API. # In app/tasks.py from celery import Celery, Task celery = Celery() @celery.task class CustomTask(Task): def run(self, x): try: # do something except Exception, e: self.retry(args=[x], exc=e) And then I run the task like so - CustomTask().apply_async(args=[x], queue='q1') And I get the error - TypeError: run() takes exactly 2 arguments (1 given) This SO