|
Server : LiteSpeed System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 User : elvh3918 ( 1528) PHP Version : 8.2.31 Disable Function : mail Directory : /usr/local/lib/python3.9/site-packages/celery/app/__pycache__/ |
a
��Sh~ � @ sv d Z ddlmZ ddlmZmZmZmZmZ ddl m
Z
ddlmZ ddl
mZ dZe
d d
� �Zddd
�Zdd� ZdS )zCelery Application.� )�_state)�app_or_default�
disable_trace�enable_trace�pop_current_task�push_current_task)�Proxy� )�Celery)�
AppPickler)
r
r r �default_app� bugreportr r �shared_taskr r c C s t jS �N)r r � r r �=/usr/local/lib/python3.9/site-packages/celery/app/__init__.py�<lambda> � r Nc C s | p
t �� �� S )z)Return information useful in bug reports.)r �get_current_appr
��appr r r r
s r
c O sD dd� }t | �dkr6t| d �r6|f i |��| d �S || i |��S )aL Create shared task (decorator).
This can be used by library authors to create tasks that'll work
for any app environment.
Returns:
~celery.local.Proxy: A proxy that always takes the task from the
current apps task registry.
Example:
>>> from celery import Celery, shared_task
>>> @shared_task
... def add(x, y):
... return x + y
...
>>> app1 = Celery(broker='amqp://')
>>> add.app is app1
True
>>> app2 = Celery(broker='redis://')
>>> add.app is app2
True
c s � fdd�}|S )Nc s� �� d��t�� �fdd�� t�� D ]B}|jr&|j�" |j� fi ��� W d � q&1 s^0 Y q&� �fdd�}t|�S )N�namec s | j � fi ���S r )�_task_from_funr )�fun�optionsr r r 7 r zJshared_task.<locals>.create_shared_task.<locals>.__inner.<locals>.<lambda>c s"