celery.app.utils

App utilities: Compat settings, bug-report tool, pickling apps.

class celery.app.utils.Settings(*args, deprecated_settings=None, **kwargs)[исходный код]

Celery settings object.

property broker_read_url
property broker_url
property broker_write_url
finalize()[исходный код]
find_option(name, namespace='')[исходный код]

Search for option by name.

Пример

>>> from proj.celery import app
>>> app.conf.find_option('disable_rate_limits')
('worker', 'prefetch_multiplier',
 <Option: type->bool default->False>))
Параметры:
  • name (str) – Name of option, cannot be partial.

  • namespace (str) – Preferred name-space (None by default).

Результат:

of (namespace, key, type).

Тип результата:

Tuple

find_value_for_key(name, namespace='celery')[исходный код]

Shortcut to get_by_parts(*find_option(name)[:-1]).

get_by_parts(*parts)[исходный код]

Return the current value for setting specified as a path.

Пример

>>> from proj.celery import app
>>> app.conf.get_by_parts('worker', 'disable_rate_limits')
False
humanize(with_defaults=False, censored=True)[исходный код]

Return a human readable text showing configuration changes.

maybe_warn_deprecated_settings()[исходный код]
property result_backend
table(with_defaults=False, censored=True)[исходный код]
property task_default_exchange
property task_default_routing_key
property timezone
value_set_for(key)[исходный код]
without_defaults()[исходный код]

Return the current configuration, but without defaults.

celery.app.utils.appstr(app)[исходный код]

String used in __repr__ etc, to id app instances.

celery.app.utils.bugreport(app)[исходный код]

Return a string containing information useful in bug-reports.

celery.app.utils.filter_hidden_settings(conf)[исходный код]

Filter sensitive settings.

celery.app.utils.find_app(app, symbol_by_name=<function symbol_by_name>, imp=<function import_from_cwd>)[исходный код]

Find app by name.

Back to Top