File: //usr/local/lib/python3.9/site-packages/celery/__pycache__/canvas.cpython-39.pyc
a
X>h�z � @ s~ d Z ddlZddlZddlZddlmZmZ ddlmZ ddl m
Z
ddlmZ ddl
mZ ddl
mZ dd lmZ dd
lmZ ddlmZmZ ddlmZ dd
lmZ ddlmZ ddlmZ ddlm Z ddl!m"Z"m#Z# ddl$m%Z% ddl&m'Z' ddl(m)Z) ddl(m*Z+ ddl(m,Z,m-Z-m.Z.m/Z/m0Z0 ddl1m2Z2 ddl3m4Z4m5Z5 dZ6dd� Z7dd� Z8dd� Z9dCd!d"�Z:G d#d$� d$ed%�Z;e%j<j=G d&d'� d'e>��Z?d(d)� Z@e?jAd*d+�G d,d-� d-e?��ZBG d.d*� d*eB�ZCG d/d0� d0e?�ZDe?�A� G d1d2� d2eD��ZEe?�A� G d3d4� d4eD��ZFe?�A� G d5d6� d6e?��Z*d7d8� ZGe?�A� G d9d:� d:e?��ZHe?jAd;d+�G d<d=� d=e?��ZIeIZJd>d?� ZKeKZLdDdAdB�ZMeMZNdS )EzmComposing task work-flows.
.. seealso:
You should import these from :mod:`celery` and not this module.
� N)�ABCMeta�abstractmethod)�deque)�MutableSequence)�deepcopy)�partial)�reduce)�
itemgetter)�
GeneratorType)�fxrange�reprcall)�cached_property)�uuid)�barrier)�current_app)�CPendingDeprecationWarning)�GroupResult�allow_join_result)�abstract��ChainMap)�_regen)�chunks)�is_list�
maybe_list�regen�seq_concat_item�seq_concat_seq)�getitem_property)�remove_repeating_from_task�truncate) � Signature�chain�xmap�xstarmapr �group�chord� signature�maybe_signaturec C s� zt | j�}W n^ tyl z| j�� }W n ttfyH | Y Y S 0 |dkr`t| j�d n| Y S Y n0 |dkr�| jd S | S dS )z�Unroll group with only one member.
This allows treating a group of a single task as if it
was a single task without pre-knowledge.� r N)�len�tasks� TypeError�__length_hint__�AttributeError�list)r% �size� r1 �7/usr/local/lib/python3.9/site-packages/celery/canvas.py�maybe_unroll_group* s $r3 c C s t | d| �S )N�name)�getattr��taskr1 r1 r2 �task_name_from<