Exemplo n.º 1
0
def _getCelery():
    celery.add_defaults(getCeleryOptions())
    # delete cached property in order to get them reloaded from the new conf
    del(celery.backend)
    for name, task in registry.tasks.items():
        # ensure that every already registed tasks doens use an unconfigured
        # backend.
        task.backend = celery.backend
    return celery
Exemplo n.º 2
0
def _getCelery():
    celery.add_defaults(getCeleryOptions())
    # delete cached property in order to get them reloaded from the new conf
    del(celery.backend)
    for name, task in registry.tasks.items():
        # ensure that every already registed tasks doens use an unconfigured
        # backend.
        task.backend = celery.backend
    return celery
Exemplo n.º 3
0
def includeme(config):

    convert_celery_options(config.registry.settings)
    celery.add_defaults(config.registry.settings)
    # delete cached property in order to get them reloaded from the new conf
    del (celery.backend)
    for name, task in registry.tasks.items():
        # ensure that every already registed tasks doens use an unconfigured
        # backend.
        task.backend = celery.backend
Exemplo n.º 4
0
def includeme(config):

    convert_celery_options(config.registry.settings)
    celery.add_defaults(config.registry.settings)
    # delete cached property in order to get them reloaded from the new conf
    del(celery.backend)
    for name, task in registry.tasks.items():
        # ensure that every already registed tasks doens use an unconfigured
        # backend.
        task.backend = celery.backend
Exemplo n.º 5
0
 def setUp(self):
     '''
     1. Parser test.ini
     2. Add configuration to the application and celery like pyramid do
     3. Drop database
     4. Drop nodes mock
     5. Import policies
     6. Create a basic structure
     '''
     app_sec = 'config:config-templates/test.ini'
     name = None
     relative_to = '.'
     kw = {'global_conf': {}}
     config = loadapp(app_sec, name=name, relative_to=relative_to, **kw)
     self.config = config
     testing.setUp(config.application.registry)
     current_app.add_defaults(config.application.registry.settings)
     self.drop_database()
     self.drop_mock_nodes()
     self.import_policies()
     self.create_basic_structure()
Exemplo n.º 6
0
def includeme(config):
    convert_celery_options(config.registry.settings)
    celery.add_defaults(config.registry.settings)