o
    ›¨Êhð  ã                   @   sr   d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl	m
Z
 dZd	Zeej d
d¡ƒZG dd„ de
ƒZdS )z@The default loader used when no custom app has been initialized.é    N)ÚNotConfigured©ÚDictAttribute)Ú	strtoboolé   )Ú
BaseLoader)ÚLoaderÚDEFAULT_CONFIG_MODULEÚceleryconfigÚ	C_WNOCONFFc                   @   s"   e Zd ZdZdd„ Zddd„ZdS )	r   z#The loader used by the default app.c                 C   s   t |ƒS )Nr   )ÚselfÚsettingsdict© r   úH/var/www/html/env/lib/python3.10/site-packages/celery/loaders/default.pyÚsetup_settings   s   zLoader.setup_settingsTc              	   C   sv   t j dt¡}z|  |¡}W n$ ty2   |s‚ tr+t j d¡s+t t	dj
|d�ƒ¡ |  i ¡ Y S w d| _|  |¡S )z0Read configuration from :file:`celeryconfig.py`.ÚCELERY_CONFIG_MODULEÚFORKED_BY_MULTIPROCESSINGzPNo {module} module found! Please make sure it exists and is available to Python.)ÚmoduleT)ÚosÚenvironÚgetr	   Ú_import_config_moduleÚImportErrorr   ÚwarningsÚwarnr   Úformatr   Ú
configured)r   Úfail_silentlyÚ
confignameÚusercfgr   r   r   Úread_configuration   s$   ÿÿÿø

zLoader.read_configurationN)T)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r    r   r   r   r   r      s    r   )r$   r   r   Úcelery.exceptionsr   Úcelery.utils.collectionsr   Úcelery.utils.serializationr   Úbaser   Ú__all__r	   r   r   r   r   r   r   r   r   Ú<module>   s    