ask/celery — Issue #589: TypeError("unsupported operand type(s) for -: 'datetime.datetime' and 'int'",)
Author: victorbstan
Created: 2012-01-16 20:46:34+00:00
State: open

[2012-01-16 15:40:22,180: ERROR/MainProcess] Task celery.backend_cleanup[d219cab0-74c0-42a1-be96-f6ff41fa851a] raised exception: TypeError("unsupported operand type(s) for -: 'datetime.datetime' and 'int'",)
Traceback (most recent call last):
File "/Users/victorstan/virtualenvs/shopcastr.com/lib/python2.7/site-packages/celery/execute/trace.py", line 47, in trace
return cls(states.SUCCESS, retval=fun(*args, **kwargs))
File "/Users/victorstan/virtualenvs/shopcastr.com/lib/python2.7/site-packages/celery/app/task/__init__.py", line 247, in __call__
return self.run(*args, **kwargs)
File "/Users/victorstan/virtualenvs/shopcastr.com/lib/python2.7/site-packages/celery/app/__init__.py", line 175, in run
return fun(*args, **kwargs)
File "/Users/victorstan/virtualenvs/shopcastr.com/lib/python2.7/site-packages/celery/task/__init__.py", line 93, in backend_cleanup
backend_cleanup.backend.cleanup()
File "/Users/victorstan/virtualenvs/shopcastr.com/lib/python2.7/site-packages/djcelery/backends/database.py", line 56, in cleanup
model._default_manager.delete_expired(self.expires)
File "/Users/victorstan/virtualenvs/shopcastr.com/lib/python2.7/site-packages/djcelery/managers.py", line 109, in delete_expired
self.get_all_expired(expires).delete()
File "/Users/victorstan/virtualenvs/shopcastr.com/lib/python2.7/site-packages/djcelery/managers.py", line 105, in get_all_expired
return self.filter(date_done__lt=datetime.now() - expires)
TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'int'