Tuesday, January 25, 2011

Upgrading Celery v1.06 to Celery v2.1.4 (or any specific version)..

1. pip install --upgrade celery==2.1.4
2. Determine where old versions of celery/carrot are being stored:
python 
import celery
import carrot
3. If the files are .egg files, rename or remove them.
4. You should restart your daemons (i.e. apscheduler) that relies on Celery to avoid Python import clashes.


If you have upgraded Celery but not Carrot, you may see this message:

Value: send() got an unexpected keyword argument 'exchange'

Stack trace:
 File "/mydirs/django/core/handlers/base.py", line 100, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File "/home/mydir/tasks/views.py", line 86, in finish
   mytask.delay(asset.id)

 File "/usr/local/lib/python2.6/dist-packages/celery/task/base.py", line 348, in delay
   return self.apply_async(args, kwargs)

 File "/usr/local/lib/python2.6/dist-packages/celery/task/base.py", line 364, in apply_async
   return apply_async(self, args, kwargs, **options)

 File "/usr/local/lib/python2.6/dist-packages/celery/messaging.py", line 294, in _inner
   return fun(*args, **kwargs)

 File "/usr/local/lib/python2.6/dist-packages/celery/execute/__init__.py", line 106, in apply_async
   expires=expires, **options)

 File "/usr/local/lib/python2.6/dist-packages/celery/messaging.py", line 99, in delay_task
   **extract_msg_options(kwargs))

No comments:

Post a Comment