|
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/backends/__pycache__/ |
a
��Sh� � @ s d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z ddl
mZ ddlm
Z
ddlmZmZmZ dd lmZ dd
lmZmZ ddlmZ ddlZddlmZmZmZmZ dd
lm Z ddl!m"Z" ddlm#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z* ddl+m,Z,m-Z-m.Z.m/Z/m0Z0 ddl1m2Z2 ddl3m4Z4m5Z5 ddl6m7Z7 ddl8m9Z9m:Z:m;Z;m<Z<m=Z= ddl>m?Z? dZ@eAdh�ZBe7eC�ZDdZEedd�ZFdZGdZHdd� ZIG dd � d eJ�ZKd!d"� ZLG d#d$� d$�ZMG d%d&� d&�ZNG d'd(� d(eMeN�ZOeOZPG d)d*� d*eM�ZQG d+d,� d,eQeN�ZRG d-d.� d.eO�ZSdS )/z�Result backend base classes.
- :class:`BaseBackend` defines the interface.
- :class:`KeyValueStoreBackend` is a common base class
using K/V semantics like _get and _put.
� N)�
namedtuple)� timedelta)�partial)�WeakValueDictionary)�
ExceptionInfo)�dumps�loads�prepare_accept_content)�registry)�bytes_to_str�ensure_bytes)�maybe_sanitize_url)�current_app�group�maybe_signature�states)�get_current_task)�Context)�BackendGetMetaError�BackendStoreError�
ChordError�ImproperlyConfigured�
NotRegistered�
SecurityError�TaskRevokedError�TimeoutError)�GroupResult�
ResultBase� ResultSet�allow_join_result�result_from_tuple)� BufferMap)�LRUCache�
arity_greater)�
get_logger)�create_exception_cls�ensure_serializable�get_pickleable_exception�get_pickled_exception�raise_with_context)� get_exponential_backoff_interval)�BaseBackend�KeyValueStoreBackend�DisabledBackend�picklei �pending_results_t)Zconcrete�weakzU
No result backend is configured.
Please see the documentation for more information.
z�
Starting chords requires a result backend to be configured.
Note that a group chained with a task is also upgraded to be a chord,
as this pattern requires synchronization.
Result backends that supports chords: Redis, Database, Memcached, and more.
c C s | |dt �� i|��S )zReturn an unpickled backend.�app)r Z_get_current_object)�cls�args�kwargs� r5 �>/usr/local/lib/python3.9/site-packages/celery/backends/base.py�unpickle_backend? s r7 c @ s e Zd Zdd� Ze Z ZZdS )� _nulldictc O s d S �Nr5 )�self�a�kwr5 r5 r6 �ignoreE s z_nulldict.ignoreN)�__name__�
__module__�__qualname__r= �__setitem__�update�
setdefaultr5 r5 r5 r6 r8 D s r8 c C s | d u rdS | j S �NF)Z
ignore_result��requestr5 r5 r6 �_is_request_ignore_resultK s rG c @ s* e Zd ZejZejZejZeZdZdZ dZ
dZddddd�Zdpdd �Z
dqd
d�Zdd
� Zddejfdd�Zddddejfdd�Zdd� Zdddejfdd�Zdddejfdd�Zdrdd�Zdsdd�Zdtdd�Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Z d)d*� Z!d+d,� Z"dud-d.�Z#dvd/d0�Z$d1d2� Z%d3d4� Z&dwd5d6�Z'd7d8� Z(dxd9d:�Z)d;d<� Z*d=d>� Z+d?d@� Z,e,Z-dAdB� Z.dCdD� Z/dEdF� Z0dGdH� Z1dIdJ� Z2dydKdL�Z3dMdN� Z4dOdP� Z5dzdQdR�Z6d{dSdT�Z7dUdV� Z8dWdX� Z9dYdZ� Z:d[d\� Z;d]d^� Z<d_d`� Z=dadb� Z>dcdd� Z?d|dedf�Z@dgdh� ZAdidj� ZBd}dkdl�ZCd~dndo�ZDdS )�BackendNFT� r � )�max_retriesZinterval_startZ
interval_stepZinterval_maxc K s || _ | j j} |p| j| _tj| j \| _| _| _|p:| j }
|
dkrJt
� nt|
d�| _| �
||�| _|d u rr| jn|| _| jd u r�| jn| j| _t| j�| _| �dd�| _| �dd�| _| �dd�| _| �d td
��| _| �dd�| _ti t� �| _tt�| _|| _ d S )N���)�limitZresult_backend_always_retryFZ+result_backend_max_sleep_between_retries_msi'