Skip to main content

Loader

The loader used by the default app.

Attributes

AttributeTypeDescription
configuredbooleanBoolean flag indicating whether the loader has successfully imported and loaded a configuration module.

Methods


setup_settings()

@classmethod
def setup_settings(
settingsdict: dict
) - > [DictAttribute](../../utils/collections/dictattribute.md?sid=celery_utils_collections_dictattribute)

Wraps a dictionary of configuration values into a DictAttribute object to allow attribute-style access to settings.

Parameters

NameTypeDescription
settingsdictdictThe raw dictionary containing configuration keys and values to be processed

Returns

TypeDescription
[DictAttribute](../../utils/collections/dictattribute.md?sid=celery_utils_collections_dictattribute)A dictionary-like object that supports attribute access for configuration keys

read_configuration()

@classmethod
def read_configuration(
fail_silently: boolean = True
) - > [DictAttribute](../../utils/collections/dictattribute.md?sid=celery_utils_collections_dictattribute)

Read configuration from :file:celeryconfig.py.

Parameters

NameTypeDescription
fail_silentlyboolean = TrueDetermines whether to suppress ImportError exceptions if the configuration module cannot be located

Returns

TypeDescription
[DictAttribute](../../utils/collections/dictattribute.md?sid=celery_utils_collections_dictattribute)The loaded configuration settings or an empty DictAttribute if the module was not found and fail_silently is True