##// END OF EJS Templates
Translation updates from RhodeCode v2.2.5...
Translation updates from RhodeCode v2.2.5 Includes a new German translation. These are licensed under GPLv3, for various reasons, including since they include textual copies of strings from the GPLv3'd Python and HTML files.

File last commit:

r4116:ffd45b18 rhodecode-2.2.5-gpl
r4137:6c485794 rhodecode-2.2.5-gpl
Show More
commands.py
100 lines | 2.9 KiB | text/x-python | PythonLexer
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 # -*- coding: utf-8 -*-
- fixes celery sqlalchemy session issues for async forking...
r1728 import rhodecode
utils/conf...
r2109 from rhodecode.lib.utils import BasePasterCommand, Command, load_rcextensions
made rhodecode work with celery 2.2, made some tasks optimizations(forget results)...
r1002 from celery.app import app_or_default
from celery.bin import camqadm, celerybeat, celeryd, celeryev
moved pylons config out of global scope for celerypylons
r1726
utils/conf...
r2109 from rhodecode.lib.utils2 import str2bool
Celery is configured by the .ini files and run from paster now...
r776
__all__ = ['CeleryDaemonCommand', 'CeleryBeatCommand',
'CAMQPAdminCommand', 'CeleryEventCommand']
made rhodecode work with celery 2.2, made some tasks optimizations(forget results)...
r1002 class CeleryCommand(BasePasterCommand):
"""Abstract class implements run methods needed for celery
Starts the celery worker that uses a paste.deploy configuration
file.
"""
def update_parser(self):
"""
Abstract method. Allows for the class's parser to be updated
before the superclass's `run` method is called. Necessary to
allow options/arguments to be passed through to the underlying
celery command.
"""
cmd = self.celery_command(app_or_default())
for x in cmd.get_options():
self.parser.add_option(x)
def command(self):
moved pylons config out of global scope for celerypylons
r1726 from pylons import config
Added explicit error message about running celeryd without enable_celery flag set to true.
r1672 try:
CELERY_ON = str2bool(config['app_conf'].get('use_celery'))
except KeyError:
CELERY_ON = False
simplified boolean expressions
r3888 if not CELERY_ON:
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 raise Exception('Please set use_celery = true in .ini config '
Added explicit error message about running celeryd without enable_celery flag set to true.
r1672 'file before running celeryd')
- fixes celery sqlalchemy session issues for async forking...
r1728 rhodecode.CELERY_ON = CELERY_ON
utils/conf...
r2109 load_rcextensions(config['here'])
made rhodecode work with celery 2.2, made some tasks optimizations(forget results)...
r1002 cmd = self.celery_command(app_or_default())
return cmd.run(**vars(self.options))
utils/conf...
r2109
made rhodecode work with celery 2.2, made some tasks optimizations(forget results)...
r1002 class CeleryDaemonCommand(CeleryCommand):
Celery is configured by the .ini files and run from paster now...
r776 """Start the celery worker
Starts the celery worker that uses a paste.deploy configuration
file.
"""
usage = 'CONFIG_FILE [celeryd options...]'
summary = __doc__.splitlines()[0]
description = "".join(__doc__.splitlines()[2:])
parser = Command.standard_parser(quiet=True)
made rhodecode work with celery 2.2, made some tasks optimizations(forget results)...
r1002 celery_command = celeryd.WorkerCommand
Celery is configured by the .ini files and run from paster now...
r776
made rhodecode work with celery 2.2, made some tasks optimizations(forget results)...
r1002 class CeleryBeatCommand(CeleryCommand):
Celery is configured by the .ini files and run from paster now...
r776 """Start the celery beat server
Starts the celery beat server using a paste.deploy configuration
file.
"""
usage = 'CONFIG_FILE [celerybeat options...]'
summary = __doc__.splitlines()[0]
description = "".join(__doc__.splitlines()[2:])
parser = Command.standard_parser(quiet=True)
made rhodecode work with celery 2.2, made some tasks optimizations(forget results)...
r1002 celery_command = celerybeat.BeatCommand
Celery is configured by the .ini files and run from paster now...
r776
made rhodecode work with celery 2.2, made some tasks optimizations(forget results)...
r1002 class CAMQPAdminCommand(CeleryCommand):
Celery is configured by the .ini files and run from paster now...
r776 """CAMQP Admin
CAMQP celery admin tool.
"""
usage = 'CONFIG_FILE [camqadm options...]'
summary = __doc__.splitlines()[0]
description = "".join(__doc__.splitlines()[2:])
parser = Command.standard_parser(quiet=True)
made rhodecode work with celery 2.2, made some tasks optimizations(forget results)...
r1002 celery_command = camqadm.AMQPAdminCommand
Celery is configured by the .ini files and run from paster now...
r776
utils/conf...
r2109
made rhodecode work with celery 2.2, made some tasks optimizations(forget results)...
r1002 class CeleryEventCommand(CeleryCommand):
"""Celery event command.
Celery is configured by the .ini files and run from paster now...
r776
Capture celery events.
"""
usage = 'CONFIG_FILE [celeryev options...]'
summary = __doc__.splitlines()[0]
description = "".join(__doc__.splitlines()[2:])
parser = Command.standard_parser(quiet=True)
made rhodecode work with celery 2.2, made some tasks optimizations(forget results)...
r1002 celery_command = celeryev.EvCommand