File: //home/arjun/projects/env/lib/python3.10/site-packages/celery/app/__pycache__/base.cpython-310.pyc
o
-we� � @ sz d Z ddlZddlZddlZddlZddlZddlmZmZm Z ddl
m
Z
ddlmZ ddl
mZ ddlmZ ddlmZ dd lmZ dd
lmZ ddlmZ ddlmZ dd
lmZ ddlmZ ddlm Z m!Z! ddl"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+ ddl,m-Z-m.Z. ddl/m0Z0 ddl1m2Z2m3Z3 ddl4m5Z5 ddl6m7Z7 ddl8m9Z9 ddl:m;Z;m<Z<m=Z= ddl>m?Z?m@Z@mAZA ddlBmCZC ddlDmEZEmFZF ddlGmHZHmIZImJZJ ddlKmLZLmMZM ddlNmOZP ddlQmRZR dd lSmTZTmUZU dd!lVmWZW dd"lXmYZYmZZZm[Z[m\Z\m]Z]m^Z^m_Z_m`Z`maZa d#ZbeCec�Zdd$hZeejf�gd%�Zhd&Zid'd(� Zjd)d*� Zkd+d,� ZlG d-d.� d.ee7�ZmG d/d0� d0�ZnenZodS )1z#Actual App instance implementation.� N)�UserDict�defaultdict�deque)�datetime��
attrgetter)�Exit)�isoparse)�pools)�LamportClock��oid_from)�register_after_fork)�cached_property)�uuid)�starpromise)� platforms�signals) �_announce_app_finalized�_deregister_app�
_register_app�_set_current_app�_task_stack�connect_on_app_finalize�get_current_app�get_current_worker_task�set_default_app)�AlwaysEagerIgnored�ImproperlyConfigured)�get_loader_cls)�PromiseProxy�maybe_evaluate)�abstract)�AttributeDictMixin)�Signal)�first�
head_from_fun�
maybe_list)�
gen_task_name�instantiate�symbol_by_name)�
get_logger)�FallbackContext�
mro_lookup)�maybe_make_aware�timezone�to_utc� )�backends�builtins)�prepare)�add_autoretry_behaviour)�DEFAULT_SECURITY_DIGEST�find_deprecated_settings)�TaskRegistry) �
AppPickler�Settings�_new_key_to_old�_old_key_to_new�
_unpickle_app�_unpickle_app_v2�appstr� bugreport�detect_settings)�Celeryzcelery.fixups.django:fixup�FORKED_BY_MULTIPROCESSINGz�
The environment variable {0!r} is not set,
and as such the configuration could not be loaded.
Please set this variable and make sure it points to
a valid configuration module.
Example:
{0}="proj.celeryconfig"
c C s t | j|tthtgd�S )z�Return true if app has customized method `attr`.
Note:
This is used for optimizations in cases where we know
how the default behavior works, but need to account
for someone using inheritance to override a method/property.
)�stop�monkey_patched)r- � __class__rB �object�__name__)�app�attr� rK �H/home/arjun/projects/env/lib/python3.10/site-packages/celery/app/base.py�app_has_customB s �rM c C s t � �| �|� S )z
Unpickle app.)r � _rgetattr)�reverse_name�argsrK rK rL �_unpickle_appattrN s rQ c
C sF z| � � W d S ty" } ztjd|dd� W Y d }~d S d }~ww )Nz!after forker raised exception: %rr1 )�exc_info)�_after_fork� Exception�logger�info)rI �excrK rK rL �_after_fork_cleanup_appU s ��rX c @ s` e Zd ZdZdZdd� Zdd� Zdd� Zdd � Zd
d� Z dd
� Z
dd� Zdd� Ze
dd� �ZdS )�PendingConfigurationNc C s t �| d|� t �| d|� d S )N�_data�callback)rG �__setattr__)�self�confr[ rK rK rL �__init__i s zPendingConfiguration.__init__c C s || j |<