Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/celery/backends/__pycache__/base.cpython-39.pyc
Ðазад
a t�hΫ � @ s d Z ddlZddlZddlZddlmZ ddlmZmZmZ ddl m Z ddlmZ ddl mZ ddlmZmZmZ dd lmZ dd lmZmZ ddlmZ ddlZddlmZmZmZmZ dd l m!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/m0Z0m1Z1 ddl2m3Z3 ddl4m5Z5m6Z6 ddl7m8Z8 ddl9m:Z:m;Z;m<Z<m=Z=m>Z> ddl?m@Z@ dZAeBdh�ZCe8eD�ZEdZFedd�ZGdZHdZIdd� ZJG dd � d eK�ZLd!d"� ZMG d#d$� d$�ZNG d%d&� d&�ZOG d'd(� d(eNeO�ZPePZQG d)d*� d*eN�ZRG d+d,� d,eReO�ZSG d-d.� d.eP�ZTdS )/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)�datetime� timedelta�timezone)�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� r7 ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/celery/backends/base.py�unpickle_backend? s r9 c @ s e Zd Zdd� Ze Z ZZdS )� _nulldictc O s d S �Nr7 )�self�a�kwr7 r7 r8 �ignoreE s z_nulldict.ignoreN)�__name__� __module__�__qualname__r? �__setitem__�update� setdefaultr7 r7 r7 r8 r: D s r: c C s | d u rdS | j S �NF)Z ignore_result��requestr7 r7 r8 �_is_request_ignore_resultK s rI 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'