Changeset - 4f2e231df222
[Not reviewed]
default
0 3 0
Mads Kiilerich - 9 years ago 2016-09-06 00:51:18
madski@unity3d.com
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
3 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/celerypylons/__init__.py
Show inline comments
 
@@ -30,7 +30,7 @@ if os.environ.get('CELERY_LOADER', CELER
 
os.environ['CELERY_LOADER'] = CELERYPYLONS_LOADER
 

	
 
# Import (and expose) celery, thus immediately triggering use of the custom Pylons loader
 
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
kallithea/lib/paster_commands/celeryd.py
Show inline comments
 
@@ -21,13 +21,13 @@ class Command(BasePasterCommand):
 
    group_name = "Kallithea"
 

	
 
    parser = BasePasterCommand.standard_parser(quiet=True)
 

	
 
    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)
 

	
 
    def command(self):
 
        from kallithea.lib import celerypylons
 
        from pylons import config
 
@@ -39,8 +39,8 @@ class Command(BasePasterCommand):
 
        if not CELERY_ON:
 
            raise Exception('Please set use_celery = true in .ini config '
 
                            'file before running celeryd')
 
        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))
setup.py
Show inline comments
 
@@ -44,13 +44,13 @@ requirements = [
 
    "WebHelpers==1.3",
 
    "formencode>=1.2.4,<=1.2.6",
 
    "SQLAlchemy>=1.0,<1.1",
 
    "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",
 
    "docutils>=0.8.1,<=0.11",
 
    "URLObject==2.3.4",
 
    "Routes==1.13",
0 comments (0 inline, 0 general)