Celery log shows cleanup failed

2019-08-04 14:53发布

问题:

I am using celery with django. I see an error when I lookup the celery log for the automatically scheduled cleanup. I am not sure what this means, and the implications of not doing the cleanup. Any help is appreciated.

[2013-09-28 23:00:00,204: ERROR/MainProcess] Task celery.backend_cleanup[65af1634-374a-4068-b1a5-749b70f7c78d] raised exception: NotImplementedError('No updates',)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/celery-3.0.15-py2.7.egg/celery/task/trace.py", line 228, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/celery-3.0.15-py2.7.egg/celery/task/trace.py", line 415, in __protected_call__
    return self.run(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/celery-3.0.15-py2.7.egg/celery/app/builtins.py", line 58, in backend_cleanup
    app.backend.cleanup()
  File "/usr/local/lib/python2.7/dist-packages/djcelery/backends/database.py", line 58, in cleanup
    model._default_manager.delete_expired(expires)
  File "/usr/local/lib/python2.7/dist-packages/djcelery/managers.py", line 110, in delete_expired
    self.get_all_expired(expires).update(hidden=True)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 469, in update
    rows = query.get_compiler(self.db).execute_sql(None)
  File "/usr/local/lib/python2.7/dist-packages/djangotoolbox/db/basecompiler.py", line 376, in execute_sql
    raise NotImplementedError('No updates')