changeset 6174:4f2e231df222

celery: upgrade to Celery 3 Celery 3 is more than 2 and is the future and should be more stable than Celery 2. There might be problems like PRECONDITION_FAILED - cannot redeclare exchange 'celeryresults' in vhost 'kallithea' with different type, durable, internal or autodelete value when celery is upgraded and it tries to upgrade existing tasks. One way to avoid that problem: - make sure celery has run to completion and there are no important pending tasks, - delete the old vhost, - upgrade celery, - create new vhost - set permissions for vhost - profit
author Mads Kiilerich <madski@unity3d.com>
date Tue, 06 Sep 2016 00:51:18 +0200
parents cf73bd884a53
children d3957c90499b
files kallithea/lib/celerypylons/__init__.py kallithea/lib/paster_commands/celeryd.py setup.py
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/celerypylons/__init__.py	Tue Sep 06 00:51:18 2016 +0200
+++ b/kallithea/lib/celerypylons/__init__.py	Tue Sep 06 00:51:18 2016 +0200
@@ -33,4 +33,4 @@
 import celery.app as app
 import celery.result as result
 from celery.task import task
-from celery.bin import celeryd
+from celery.bin import worker
--- a/kallithea/lib/paster_commands/celeryd.py	Tue Sep 06 00:51:18 2016 +0200
+++ b/kallithea/lib/paster_commands/celeryd.py	Tue Sep 06 00:51:18 2016 +0200
@@ -24,7 +24,7 @@
 
     def update_parser(self):
         from kallithea.lib import celerypylons
-        cmd = celerypylons.celeryd.WorkerCommand(celerypylons.app.app_or_default())
+        cmd = celerypylons.worker.worker(celerypylons.app.app_or_default())
         for x in cmd.get_options():
             self.parser.add_option(x)
 
@@ -42,5 +42,5 @@
         kallithea.CELERY_ON = CELERY_ON
 
         load_rcextensions(config['here'])
-        cmd = celerypylons.celeryd.WorkerCommand(celerypylons.app.app_or_default())
+        cmd = celerypylons.worker.worker(celerypylons.app.app_or_default())
         return cmd.run(**vars(self.options))
--- a/setup.py	Tue Sep 06 00:51:18 2016 +0200
+++ b/setup.py	Tue Sep 06 00:51:18 2016 +0200
@@ -47,7 +47,7 @@
     "Mako>=0.9.0,<=1.0.0",
     "pygments>=1.5",
     "whoosh>=2.4.0,<=2.5.7",
-    "celery>=2.2.5,<2.3",
+    "celery>=3.1,<3.2",
     "babel>=0.9.6,<=1.3",
     "python-dateutil>=1.5.0,<2.0.0",
     "markdown==2.2.1",