Ë
    –V.j‹  ã                   óö  — d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZmZmZ d	d
lmZmZ d	dlmZmZ d	dlmZ d	dlmZmZmZ d	dlmZmZ 	 ddl Z dZ"dZ#d„ Z$ed„ «       Z%ed„ «       Z& G d„ d«      Z'ejP                   G d„ de'«      «       Z)ejP                   G d„ de'«      «       Z*ejP                   G d„ de*«      «       Z+ejP                   G d„ de)«      «       Z,dd„Z-y# e!$ r dZ Y Œ—w xY w) z3Task results/state and results for groups of tasks.é    N)Údeque)Úcontextmanager)Úproxy)Úisoparse)Úcached_property)ÚThenableÚbarrierÚpromiseé   )Úcurrent_appÚstates)Ú_set_task_join_will_blockÚtask_join_will_block)Úapp_or_default)ÚImproperlyConfiguredÚIncompleteStreamÚTimeoutError)ÚDependencyGraphÚGraphFormatter)Ú
ResultBaseÚAsyncResultÚ	ResultSetÚGroupResultÚEagerResultÚresult_from_tuplezˆNever call result.get() within a task!
See https://docs.celeryq.dev/en/latest/userguide/tasks.html#avoid-launching-synchronous-subtasks
c                  ó6   — t        «       rt        t        «      ‚y ©N)r   ÚRuntimeErrorÚE_WOULDBLOCK© ó    úOC:\xampp\htdocs\tradingbinance\backend\.venv\Lib\site-packages\celery/result.pyÚassert_will_not_blockr#   $   s   € ÜÔÜœ<Ó(Ð(ð r!   c               #   óv   K  — t        «       } t        d«       	 d –— t        | «       y # t        | «       w xY w­w©NF©r   r   ©Úreset_values    r"   Úallow_join_resultr)   )   s/   è ø€ ä&Ó(€KÜ˜eÔ$ð/Ûä! +Õ.øÔ! +Õ.üó   ‚9™) �9©6¶9c               #   óv   K  — t        «       } t        d«       	 d –— t        | «       y # t        | «       w xY w­w©NTr&   r'   s    r"   Údenied_join_resultr-   3   s/   è ø€ ä&Ó(€KÜ˜dÔ#ð/Ûä! +Õ.øÔ! +Õ.ür*   c                   ó   — e Zd ZdZdZy)r   zBase class for results.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úparentr    r!   r"   r   r   =   s   „ Ù!ð �Fr!   r   c                   óŒ  — e Zd ZdZdZeZdZdZ	 	 	 d7d„Ze	d„ «       Z
e
j                  d„ «       Z
d8d„Zd„ Zd„ Zd	„ Zd
„ Z	 	 d9d„Z	 	 d9d„Zdddddddddej(                  ej*                  fd„ZeZd„ Zd„ Zd:d„Zd„ Zd:d„Zd„ Zd„ Zd„ Zd„ Z d;d„Z!e!Z"d„ Z#d<d„Z$d„ Z%d„ Z&d„ Z'd„ Z(d „ Z)d!„ Z*d"„ Z+d#„ Z,e-d$„ «       Z.e	d%„ «       Z/e	d&„ «       Z0d'„ Z1d(„ Z2d)„ Z3d*„ Z4e	d+„ «       Z5e5Z6e	d,„ «       Z7e	d-„ «       Z8e8Z9e	d.„ «       Z:e:j                  d/„ «       Z:e	d0„ «       Z;e	d1„ «       Z<e	d2„ «       Z=e	d3„ «       Z>e	d4„ «       Z?e	d5„ «       Z@e	d6„ «       ZAy)=r   zxQuery task state.

    Arguments:
        id (str): See :attr:`id`.
        backend (Backend): See :attr:`backend`.
    Nc                 ó   — |€t        dt        |«      › �«      ‚t        |xs | j                  «      | _        || _        |xs | j                  j
                  | _        || _        t        | j                  d¬«      | _	        d | _
        d| _        y )Nz#AsyncResult requires valid id, not T©ÚweakF)Ú
ValueErrorÚtyper   ÚappÚidÚbackendr3   r
   Ú_on_fulfilledÚon_readyÚ_cacheÚ_ignored)Úselfr;   r<   Ú	task_namer:   r3   s         r"   Ú__init__zAsyncResult.__init__X   s€   € ð ˆ:ÜØ5´d¸2³h°ZÐ@óBð Bä! #¢/¨¯©Ó2ˆŒØˆŒØÒ2 $§(¡(×"2Ñ"2ˆŒØˆŒÜ × 2Ñ 2¸Ô>ˆŒØˆŒØˆ�r!   c                 ó4   — t        | d«      r| j                  S y)z+If True, task result retrieval is disabled.r@   F)Úhasattrr@   ©rA   s    r"   ÚignoredzAsyncResult.ignoredf   s   € ô �4˜Ô$Ø—=‘=Ð Ør!   c                 ó   — || _         y)z%Enable/disable task result retrieval.N)r@   )rA   Úvalues     r"   rG   zAsyncResult.ignoredm   s   € ð ˆ�r!   c                 ót   — | j                   j                  | |¬«       | j                  j                  ||«      S )Nr6   )r<   Úadd_pending_resultr>   Úthen©rA   ÚcallbackÚon_errorr7   s       r"   rL   zAsyncResult.thenr   s0   € Ø�‰×'Ñ'¨°4Ð'Ô8Ø�}‰}×!Ñ! (¨HÓ5Ð5r!   c                 ó<   — | j                   j                  | «       |S r   ©r<   Úremove_pending_result©rA   Úresults     r"   r=   zAsyncResult._on_fulfilledv   s   € Ø�‰×*Ñ*¨4Ô0Øˆr!   c                 ó^   — | j                   }| j                  |xr |j                  «       fd fS r   )r3   r;   Úas_tuple)rA   r3   s     r"   rV   zAsyncResult.as_tuplez   s+   € Ø—‘ˆØ—‘˜Ò5 F§O¡OÓ$5Ð6¸Ð<Ð<r!   c                 óš   — g }| j                   }|j                  | j                  «       |�|j                  |j	                  «       «       |S )zReturn as a list of task IDs.)r3   Úappendr;   ÚextendÚas_list)rA   Úresultsr3   s      r"   rZ   zAsyncResult.as_list~   s>   € àˆØ—‘ˆØ�‰�t—w‘wÔØÐØ�N‰N˜6Ÿ>™>Ó+Ô,Øˆr!   c                 ó¨   — d| _         | j                  r| j                  j                  «        | j                  j                  | j                  «       y)z/Forget the result of this task and its parents.N)r?   r3   Úforgetr<   r;   rF   s    r"   r]   zAsyncResult.forget‡   s6   € àˆŒØ�;Š;Ø�K‰K×ÑÔ Ø�‰×Ñ˜DŸG™GÕ$r!   c                 ón   — | j                   j                  j                  | j                  |||||¬«       y)aŠ  Send revoke signal to all workers.

        Any worker receiving the task, or having reserved the
        task, *must* ignore it.

        Arguments:
            terminate (bool): Also terminate the process currently working
                on the task (if any).
            signal (str): Name of signal to send to process if terminate.
                Default is TERM.
            wait (bool): Wait for replies from workers.
                The ``timeout`` argument specifies the seconds to wait.
                Disabled by default.
            timeout (float): Time in seconds to wait for replies when
                ``wait`` is enabled.
        ©Ú
connectionÚ	terminateÚsignalÚreplyÚtimeoutN)r:   ÚcontrolÚrevoker;   )rA   r`   ra   rb   Úwaitrd   s         r"   rf   zAsyncResult.revokeŽ   s3   € ð$ 	�‰×Ñ×Ñ §¡°JØ*3¸FØ&*°Gð 	 õ 	=r!   c                 óZ   — | j                   j                  j                  ||||||¬«       y)a7  Send revoke signal to all workers only for tasks with matching headers values.

        Any worker receiving the task, or having reserved the
        task, *must* ignore it.
        All header fields *must* match.

        Arguments:
            headers (dict[str, Union(str, list)]): Headers to match when revoking tasks.
            terminate (bool): Also terminate the process currently working
                on the task (if any).
            signal (str): Name of signal to send to process if terminate.
                Default is TERM.
            wait (bool): Wait for replies from workers.
                The ``timeout`` argument specifies the seconds to wait.
                Disabled by default.
            timeout (float): Time in seconds to wait for replies when
                ``wait`` is enabled.
        r_   N)r:   re   Úrevoke_by_stamped_headers)rA   Úheadersr`   ra   rb   rg   rd   s          r"   ri   z%AsyncResult.revoke_by_stamped_headers¤   s0   € ð( 	�‰×Ñ×2Ñ2°7ÀzØ=FÈvØ9=Àwð 	3õ 	Pr!   Tç      à?c           
      ó°  — | j                   ry|	r
t        «        t        «       }|r5|r3| j                  r't        | j                  d¬«      }| j	                  «        |r|j                  |«       | j                  r |r| j                  |¬«       | j                  S | j                  j                  | «       | j                  j                  | |||||||¬«      S )aÝ  Wait until task is ready, and return its result.

        Warning:
           Waiting for tasks within a task may lead to deadlocks.
           Please read :ref:`task-synchronous-subtasks`.

        Warning:
           Backends use resources to store and transmit results. To ensure
           that resources are released, you must eventually call
           :meth:`~@AsyncResult.get` or :meth:`~@AsyncResult.forget` on
           EVERY :class:`~@AsyncResult` instance returned after calling
           a task.

        Arguments:
            timeout (float): How long to wait, in seconds, before the
                operation times out. This is the setting for the publisher
                (celery client) and is different from `timeout` parameter of
                `@app.task`, which is the setting for the worker. The task
                isn't terminated even if timeout occurs.
            propagate (bool): Re-raise exception if the task failed.
            interval (float): Time to wait (in seconds) before retrying to
                retrieve the result.  Note that this does not have any effect
                when using the RPC/redis result store backends, as they don't
                use polling.
            no_ack (bool): Enable amqp no ack (automatically acknowledge
                message).  If this is :const:`False` then the message will
                **not be acked**.
            follow_parents (bool): Re-raise any exception raised by
                parent tasks.
            disable_sync_subtasks (bool): Disable tasks to wait for sub tasks
                this is the default configuration. CAUTION do not enable this
                unless you must.

        Raises:
            celery.exceptions.TimeoutError: if `timeout` isn't
                :const:`None` and the result does not arrive within
                `timeout` seconds.
            Exception: If the remote call raised an exception then that
                exception will be re-raised in the caller process.
        NTr6   )rN   )rd   ÚintervalÚon_intervalÚno_ackÚ	propagaterN   Ú
on_message)rG   r#   r
   r3   Ú_maybe_reraise_parent_errorrL   r?   Úmaybe_throwrT   r<   rK   Úwait_for_pending)rA   rd   rp   rm   ro   Úfollow_parentsrN   rq   rn   Údisable_sync_subtasksÚEXCEPTION_STATESÚPROPAGATE_STATESÚ_on_intervals                r"   ÚgetzAsyncResult.get¼   sÃ   € ðZ �<Š<Øá Ü!Ô#Ü“yˆÙ™i¨D¯KªKÜ" 4×#CÑ#CÈ$ÔOˆLØ×,Ñ,Ô.ÙØ×Ñ˜kÔ*à�;Š;ÙØ× Ñ ¨(Ð Ô3Ø—;‘;Ðà�‰×'Ñ'¨Ô-Ø�|‰|×,Ñ,Ø˜'ØØ$ØØØØ!ð -ó 
ð 	
r!   c                 ór   — t        t        | j                  «       «      «      D ]  }|j                  «        Œ y r   )ÚreversedÚlistÚ_parentsrs   ©rA   Únodes     r"   rr   z'AsyncResult._maybe_reraise_parent_error  s(   € ÜœT $§-¡-£/Ó2Ö3ˆDØ×ÑÕñ 4r!   c              #   óP   K  — | j                   }|r|–— |j                   }|rŒy y ­wr   ©r3   r   s     r"   r~   zAsyncResult._parents
  s%   è ø€ Ø�{‰{ˆÙØŠJØ—;‘;ˆDô ùs   ‚!&¤&c              +   ól   K  — | j                  |¬«      D ]  \  }}| |j                  di |¤Žf–— Œ y­w)a´  Collect results as they return.

        Iterator, like :meth:`get` will wait for the task to complete,
        but will also follow :class:`AsyncResult` and :class:`ResultSet`
        returned by the task, yielding ``(result, value)`` tuples for each
        result in the tree.

        An example would be having the following tasks:

        .. code-block:: python

            from celery import group
            from proj.celery import app

            @app.task(trail=True)
            def A(how_many):
                return group(B.s(i) for i in range(how_many))()

            @app.task(trail=True)
            def B(i):
                return pow2.delay(i)

            @app.task(trail=True)
            def pow2(i):
                return i ** 2

        .. code-block:: pycon

            >>> from celery.result import ResultBase
            >>> from proj.tasks import A

            >>> result = A.delay(10)
            >>> [v for v in result.collect()
            ...  if not isinstance(v, (ResultBase, tuple))]
            [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]

        Note:
            The ``Task.trail`` option must be enabled
            so that the list of children is stored in ``result.children``.
            This is the default but enabled explicitly for illustration.

        Yields:
            Tuple[AsyncResult, Any]: tuples containing the result instance
            of the child task, and the return value of that task.
        ©ÚintermediateNr    ©Úiterdepsrz   )rA   r…   ÚkwargsÚ_ÚRs        r"   ÚcollectzAsyncResult.collect  s9   è ø€ ð\ —M‘M¨|�MÖ<‰DˆAˆqØ�U�Q—U‘U‘_˜V‘_Ð$Ó$ñ =ùs   ‚24c                 óZ   — d }| j                  «       D ]  \  }}|j                  «       }Œ |S r   r†   )rA   rI   r‰   rŠ   s       r"   Úget_leafzAsyncResult.get_leafA  s+   € ØˆØ—M‘M–O‰DˆAˆqØ—E‘E“G‰Eð $àˆr!   c              #   óø   ‡K  — t        d | fg«      }| }|rb|j                  «       \  }Š|‰f–— ‰j                  «       r)|j                  ˆfd„‰j                  xs g D «       «       n|r
t        «       ‚|rŒay y ­w)Nc              3   ó&   •K  — | ]  }‰|f–— Œ
 y ­wr   r    )Ú.0Úchildr€   s     €r"   Ú	<genexpr>z'AsyncResult.iterdeps.<locals>.<genexpr>P  s   øè ø€ ÐLÑ8K¨u˜d Eœ]Ñ8Kùs   ƒ)r   ÚpopleftÚreadyrY   Úchildrenr   )rA   r…   ÚstackÚis_incomplete_streamr3   r€   s        @r"   r‡   zAsyncResult.iterdepsG  st   øè ø€ Ü˜˜d�|�nÓ%ˆà#/Ð/ÐáØ Ÿ=™=›?‰LˆF�DØ˜$�,ÒØ�z‰zŒ|Ø—‘ÓL¸¿¹Ò8KÈÐ8KÓLÕLá'Ü*Ó,Ð,ô ùs   ƒA4A:Á8A:c                 óF   — | j                   | j                  j                  v S )z¨Return :const:`True` if the task has executed.

        If the task is still running, pending, or is waiting
        for retry then :const:`False` is returned.
        )Ústater<   ÚREADY_STATESrF   s    r"   r”   zAsyncResult.readyU  s   € ð �z‰z˜TŸ\™\×6Ñ6Ð6Ð6r!   c                 ó<   — | j                   t        j                  k(  S )z7Return :const:`True` if the task executed successfully.)r™   r   ÚSUCCESSrF   s    r"   Ú
successfulzAsyncResult.successful]  ó   € à�z‰zœVŸ^™^Ñ+Ð+r!   c                 ó<   — | j                   t        j                  k(  S )z(Return :const:`True` if the task failed.)r™   r   ÚFAILURErF   s    r"   ÚfailedzAsyncResult.faileda  rž   r!   c                 ó<   —  | j                   j                  |i |¤Ž y r   )r>   Úthrow©rA   Úargsrˆ   s      r"   r£   zAsyncResult.throwe  s   € Øˆ�‰×Ñ˜TÐ, VÓ,r!   c                 ó   — | j                   €| j                  «       n| j                   }|d   |d   |j                  d«      }}}|t        j                  v r#|r!| j                  || j                  |«      «       |� || j                  |«       |S )NÚstatusrT   Ú	traceback)r?   Ú_get_task_metarz   r   rx   r£   Ú_to_remote_tracebackr;   )rA   rp   rN   Úcacher™   rI   Útbs          r"   rs   zAsyncResult.maybe_throwh  s‚   € Ø)-¯©Ð)<�×#Ñ#Ô%À$Ç+Á+ˆà�(‰O˜U 8™_¨e¯i©i¸Ó.Dð ˆuˆà”F×+Ñ+Ñ+±	Ø�J‰J�u˜d×7Ñ7¸Ó;Ô<ØÐÙ�T—W‘W˜eÔ$Øˆr!   c                 ó²   — |rUt         �N| j                  j                  j                  r-t         j                  j                  |«      j                  «       S y y y r   )Útblibr:   ÚconfÚtask_remote_tracebacksÚ	TracebackÚfrom_stringÚas_traceback)rA   r¬   s     r"   rª   z AsyncResult._to_remote_tracebacks  sC   € Ù”%Ð#¨¯©¯©×(LÒ(LÜ—?‘?×.Ñ.¨rÓ2×?Ñ?ÓAÐAð )MÐ#ˆ2r!   c                 óÐ   — t        |xs t        | j                  d¬«      ¬«      }| j                  |¬«      D ]+  \  }}|j	                  |«       |sŒ|j                  ||«       Œ- |S )NÚoval)ÚrootÚshape)Ú	formatterr„   )r   r   r;   r‡   Úadd_arcÚadd_edge)rA   r…   r¸   Úgraphr3   r€   s         r"   Úbuild_graphzAsyncResult.build_graphw  s_   € ÜØÒM¤>°t·w±wÀfÔ#Mô
ˆð !ŸM™M°|˜MÖD‰LˆF�DØ�M‰M˜$ÔÚØ—‘˜v tÕ,ð Eð ˆr!   c                 ó,   — t        | j                  «      S ©z`str(self) -> self.id`.©Ústrr;   rF   s    r"   Ú__str__zAsyncResult.__str__�  ó   € ä�4—7‘7‹|Ðr!   c                 ó,   — t        | j                  «      S ©z`hash(self) -> hash(self.id)`.©Úhashr;   rF   s    r"   Ú__hash__zAsyncResult.__hash__…  ó   € ä�D—G‘G‹}Ðr!   c                 óN   — dt        | «      j                  › d| j                  › d�S )NÚ<ú: Ú>)r9   r/   r;   rF   s    r"   Ú__repr__zAsyncResult.__repr__‰  s&   € Ø”4˜“:×&Ñ&Ð' r¨$¯'©'¨°!Ð4Ð4r!   c                 óž   — t        |t        «      r|j                  | j                  k(  S t        |t        «      r|| j                  k(  S t        S r   )Ú
isinstancer   r;   rÀ   ÚNotImplemented©rA   Úothers     r"   Ú__eq__zAsyncResult.__eq__Œ  s>   € Ü�eœ[Ô)Ø—8‘8˜tŸw™wÑ&Ð&Ü˜œsÔ#Ø˜DŸG™GÑ#Ð#ÜÐr!   c                 ó|   — | j                  | j                  | j                  d | j                  | j                  «      S r   )Ú	__class__r;   r<   r:   r3   rF   s    r"   Ú__copy__zAsyncResult.__copy__“  s.   € Ø�~‰~Ø�G‰G�T—\‘\ 4¨¯©°4·;±;ó
ð 	
r!   c                 ó:   — | j                   | j                  «       fS r   ©rÕ   Ú__reduce_args__rF   s    r"   Ú
__reduce__zAsyncResult.__reduce__˜  ó   € Ø�~‰~˜t×3Ñ3Ó5Ð5Ð5r!   c                 óL   — | j                   | j                  d d | j                  fS r   )r;   r<   r3   rF   s    r"   rÙ   zAsyncResult.__reduce_args__›  s   € Ø�w‰w˜Ÿ™ d¨D°$·+±+Ð=Ð=r!   c                 óT   — | j                   �| j                   j                  | «       yy)z9Cancel pending operations when the instance is destroyed.NrQ   rF   s    r"   Ú__del__zAsyncResult.__del__ž  s#   € à�<‰<Ð#Ø�L‰L×.Ñ.¨tÕ4ð $r!   c                 ó"   — | j                  «       S r   )r¼   rF   s    r"   r»   zAsyncResult.graph£  s   € à×ÑÓ!Ð!r!   c                 ó.   — | j                   j                  S r   )r<   Úsupports_native_joinrF   s    r"   rá   z AsyncResult.supports_native_join§  s   € à�|‰|×0Ñ0Ð0r!   c                 ó@   — | j                  «       j                  d«      S ©Nr•   ©r©   rz   rF   s    r"   r•   zAsyncResult.children«  s   € à×"Ñ"Ó$×(Ñ(¨Ó4Ð4r!   c                 ó²   — |rT|d   }|t         j                  v r=| j                  | j                  j	                  |«      «      }| j                  | «       |S |S )Nr§   )r   rš   Ú
_set_cacher<   Úmeta_from_decodedr>   )rA   Úmetar™   Úds       r"   Ú_maybe_set_cachezAsyncResult._maybe_set_cache¯  sO   € ÙØ˜‘NˆEØœ×+Ñ+Ñ+Ø—O‘O D§L¡L×$BÑ$BÀ4Ó$HÓI�Ø—‘˜dÔ#Ø�Øˆr!   c                 óš   — | j                   €4| j                  | j                  j                  | j                  «      «      S | j                   S r   )r?   rê   r<   Úget_task_metar;   rF   s    r"   r©   zAsyncResult._get_task_meta¸  s:   € Ø�;‰;ÐØ×(Ñ(¨¯©×)CÑ)CÀDÇGÁGÓ)LÓMÐMØ�{‰{Ðr!   c                 ó6   — t        | j                  «       g«      S r   )Úiterr©   )rA   rˆ   s     r"   Ú
_iter_metazAsyncResult._iter_meta½  s   € Ü�T×(Ñ(Ó*Ð+Ó,Ð,r!   c                 ó’   — |j                  d«      }|r'|D �cg c]  }t        || j                  «      ‘Œ c}|d<   || _        |S c c}w rã   )rz   r   r:   r?   )rA   ré   r•   r‘   s       r"   ræ   zAsyncResult._set_cacheÀ  sO   € Ø—5‘5˜Ó$ˆÙá@HóÙ@H°uÔ! %¨¯©Õ2ÀñˆAˆj‰Mð ˆŒØˆùò	s   ˜Ac                 ó(   — | j                  «       d   S )zÕTask return value.

        Note:
            When the task has been executed, this contains the return value.
            If the task raised an exception, this will be the exception
            instance.
        rT   ©r©   rF   s    r"   rT   zAsyncResult.resultÉ  s   € ð ×"Ñ"Ó$ XÑ.Ð.r!   c                 ó@   — | j                  «       j                  d«      S )z#Get the traceback of a failed task.r¨   rä   rF   s    r"   r¨   zAsyncResult.tracebackÕ  s   € ð ×"Ñ"Ó$×(Ñ(¨Ó5Ð5r!   c                 ó(   — | j                  «       d   S )a   The tasks current state.

        Possible values includes:

            *PENDING*

                The task is waiting for execution.

            *STARTED*

                The task has been started.

            *RETRY*

                The task is to be retried, possibly because of failure.

            *FAILURE*

                The task raised an exception, or has exceeded the retry limit.
                The :attr:`result` attribute then contains the
                exception raised by the task.

            *SUCCESS*

                The task executed successfully.  The :attr:`result` attribute
                then contains the tasks return value.
        r§   rò   rF   s    r"   r™   zAsyncResult.stateÚ  s   € ð: ×"Ñ"Ó$ XÑ.Ð.r!   c                 ó   — | j                   S )zCompat. alias to :attr:`id`.©r;   rF   s    r"   Útask_idzAsyncResult.task_idú  s   € ð �w‰wˆr!   c                 ó   — || _         y r   rö   )rA   r;   s     r"   r÷   zAsyncResult.task_idÿ  s	   € àˆ�r!   c                 ó@   — | j                  «       j                  d«      S )NÚnamerä   rF   s    r"   rú   zAsyncResult.name  ó   € à×"Ñ"Ó$×(Ñ(¨Ó0Ð0r!   c                 ó@   — | j                  «       j                  d«      S )Nr¥   rä   rF   s    r"   r¥   zAsyncResult.args  rû   r!   c                 ó@   — | j                  «       j                  d«      S )Nrˆ   rä   rF   s    r"   rˆ   zAsyncResult.kwargs  ó   € à×"Ñ"Ó$×(Ñ(¨Ó2Ð2r!   c                 ó@   — | j                  «       j                  d«      S )NÚworkerrä   rF   s    r"   r   zAsyncResult.worker  rþ   r!   c                 ó’   — | j                  «       j                  d«      }|r%t        |t        j                  «      st	        |«      S |S )zUTC date and time.Ú	date_done)r©   rz   rÏ   Údatetimer   )rA   r  s     r"   r  zAsyncResult.date_done  s@   € ð ×'Ñ'Ó)×-Ñ-¨kÓ:ˆ	ÙœZ¨	´8×3DÑ3DÔEÜ˜IÓ&Ð&ØÐr!   c                 ó@   — | j                  «       j                  d«      S )NÚretriesrä   rF   s    r"   r  zAsyncResult.retries  s   € à×"Ñ"Ó$×(Ñ(¨Ó3Ð3r!   c                 ó@   — | j                  «       j                  d«      S )NÚqueuerä   rF   s    r"   r  zAsyncResult.queue  s   € à×"Ñ"Ó$×(Ñ(¨Ó1Ð1r!   )NNNNr%   ©NFNFN)F)TN)FN)Br/   r0   r1   r2   r:   r   r;   r<   rC   ÚpropertyrG   ÚsetterrL   r=   rV   rZ   r]   rf   ri   r   rw   rx   rz   rg   rr   r~   r‹   r�   r‡   r”   r�   r¡   r£   rs   Úmaybe_reraiserª   r¼   rÁ   rÇ   rÍ   rÓ   rÖ   rÚ   rÙ   rÞ   r   r»   rá   r•   rê   r©   rï   ræ   rT   Úinfor¨   r™   r§   r÷   rú   r¥   rˆ   r   r  r  r  r    r!   r"   r   r   D   s†  „ ñð €Cð  €Lð 
€Bð €Gà#'ØØ"&óð ñó ðð ‡^�^ñó ðó6òò=òò%ð ?CØ#'ó=ð, [_Ø6:óPð0 ¨$¸Ø¨°tÈØ°DØ#×4Ñ4Ø#×4Ñ4ó	G
ðP €Dòòó/%òbó-ò7ò,ò,ò-óð  €MòBóòòò5òò
ò
6ò>ò5ð
 ñ"ó ð"ð ñ1ó ð1ð ñ5ó ð5òòò
-òð ñ/ó ð/ð €Dàñ6ó ð6ð ñ/ó ð/ð: €Fàñó ðð ‡^�^ñó ðð ñ1ó ð1ð ñ1ó ð1ð ñ3ó ð3ð ñ3ó ð3ð ñó ðð ñ4ó ð4ð ñ2ó ñ2r!   r   c                   ó>  — e Zd ZdZdZdZd"d„Zd„ Zd„ Zd„ Z	d„ Z
d„ Zd	„ Zd
„ Zd„ Zd#d„ZeZd„ Zd„ Zd„ Zd„ Z	 	 d$d„Zd„ Zd„ Z	 	 	 d%d„Z	 	 	 d%d„Zd&d„Z	 	 d'd„Z	 	 	 	 d(d„Zd„ Zd„ Zd„ Zd„ Z d„ Z!e"d„ «       Z#e"d„ «       Z$e$jJ                  d „ «       Z$e"d!„ «       Z&y))r   zpA collection of results.

    Arguments:
        results (Sequence[AsyncResult]): List of result instances.
    Nc                 óø   — || _         || _        t        t        | «      f¬«      | _        |xs t        |«      | _        | j                  r1| j                  j                  t        | j                  d¬«      «       y y )N)r¥   Tr6   )	Ú_appr[   r
   r   r>   r	   Ú_on_fullrL   Ú	_on_ready)rA   r[   r:   Úready_barrierrˆ   s        r"   rC   zResultSet.__init__1  s\   € ØˆŒ	ØˆŒÜ¤e¨D£k ^Ô4ˆŒØ%Ò9¬°Ó)9ˆŒØ�=Š=Ø�M‰M×Ñœw t§~¡~¸DÔAÕBð r!   c                 ó¨   — || j                   vrD| j                   j                  |«       | j                  r| j                  j                  |«       yyy)zvAdd :class:`AsyncResult` as a new member of the set.

        Does nothing if the result is already a member.
        N)r[   rX   r  ÚaddrS   s     r"   r  zResultSet.add9  sE   € ð
 ˜Ÿ™Ñ%Ø�L‰L×Ñ Ô'Ø�}Š}Ø—‘×!Ñ! &Õ)ð ð &r!   c                 óR   — | j                   j                  r| j                  «        y y r   )r<   Úis_asyncr>   rF   s    r"   r  zResultSet._on_readyC  s   € Ø�<‰<× Ò Ø�M‰M�Oð !r!   c                 óÂ   — t        |t        «      r| j                  j                  |«      }	 | j                  j                  |«       y# t        $ r t        |«      ‚w xY w)z~Remove result from the set; it must be a member.

        Raises:
            KeyError: if the result isn't a member.
        N)rÏ   rÀ   r:   r   r[   Úremover8   ÚKeyErrorrS   s     r"   r  zResultSet.removeG  sS   € ô �fœcÔ"Ø—X‘X×)Ñ)¨&Ó1ˆFð	#Ø�L‰L×Ñ Õ'øÜò 	#Ü˜6Ó"Ð"ð	#ús   ­A	 Á	Ac                 óF   — 	 | j                  |«       y# t        $ r Y yw xY w)zbRemove result from the set if it is a member.

        Does nothing if it's not a member.
        N)r  r  rS   s     r"   ÚdiscardzResultSet.discardT  s%   € ð
	Ø�K‰K˜ÕøÜò 	Ùð	ús   ‚ ”	 Ÿ c                 óN   ‡ — ‰ j                   j                  ˆ fd„|D «       «       y)z Extend from iterable of results.c              3   ó@   •K  — | ]  }|‰j                   vsŒ|–— Œ y ­wr   ©r[   )r�   ÚrrA   s     €r"   r’   z#ResultSet.update.<locals>.<genexpr>`  s   øè ø€ ÐH¡w !°!¸4¿<¹<Ò2GœA¡wùs   ƒ—N)r[   rY   )rA   r[   s   ` r"   ÚupdatezResultSet.update^  s   ø€ à�‰×ÑÓH¡wÓHÕHr!   c                 ó"   — g | j                   dd y)z!Remove all results from this set.Nr  rF   s    r"   ÚclearzResultSet.clearb  s   € àˆ�‰‘Q‰r!   c                 ó:   — t        d„ | j                  D «       «      S )z²Return true if all tasks successful.

        Returns:
            bool: true if all of the tasks finished
                successfully (i.e. didn't raise an exception).
        c              3   ó<   K  — | ]  }|j                  «       –— Œ y ­wr   )r�   ©r�   rT   s     r"   r’   z'ResultSet.successful.<locals>.<genexpr>m  s   è ø€ ÐB±\¨6�6×$Ñ$×&±\ùó   ‚©Úallr[   rF   s    r"   r�   zResultSet.successfulf  s   € ô ÑB°T·\²\ÓBÓBÐBr!   c                 ó:   — t        d„ | j                  D «       «      S )z¡Return true if any of the tasks failed.

        Returns:
            bool: true if one of the tasks failed.
                (i.e., raised an exception)
        c              3   ó<   K  — | ]  }|j                  «       –— Œ y ­wr   )r¡   r%  s     r"   r’   z#ResultSet.failed.<locals>.<genexpr>v  s   è ø€ Ð>± v�6—=‘=—?±ùr&  ©Úanyr[   rF   s    r"   r¡   zResultSet.failedo  s   € ô Ñ>°·²Ó>Ó>Ð>r!   c                 óL   — | j                   D ]  }|j                  ||¬«       Œ y )N)rN   rp   )r[   rs   )rA   rN   rp   rT   s       r"   rs   zResultSet.maybe_throwx  s#   € Ø—l”lˆFØ×Ñ¨¸IÐÕFñ #r!   c                 ó:   — t        d„ | j                  D «       «      S )z¦Return true if any of the tasks are incomplete.

        Returns:
            bool: true if one of the tasks are still
                waiting for execution.
        c              3   ó>   K  — | ]  }|j                  «        –— Œ y ­wr   ©r”   r%  s     r"   r’   z$ResultSet.waiting.<locals>.<genexpr>„  s   è ø€ ÐA±L¨&�v—|‘|“~Ô%±Lùs   ‚r+  rF   s    r"   ÚwaitingzResultSet.waiting}  s   € ô ÑA°D·L²LÓAÓAÐAr!   c                 ó:   — t        d„ | j                  D «       «      S )z˜Did all of the tasks complete? (either by success of failure).

        Returns:
            bool: true if all of the tasks have been executed.
        c              3   ó<   K  — | ]  }|j                  «       –— Œ y ­wr   r0  r%  s     r"   r’   z"ResultSet.ready.<locals>.<genexpr>Œ  s   è ø€ Ð=± f�6—<‘<—>±ùr&  r'  rF   s    r"   r”   zResultSet.ready†  s   € ô Ñ=°·²Ó=Ó=Ð=r!   c                 ó:   — t        d„ | j                  D «       «      S )a  Task completion count.

        Note that `complete` means `successful` in this context. In other words, the
        return value of this method is the number of ``successful`` tasks.

        Returns:
            int: the number of complete (i.e. successful) tasks.
        c              3   óN   K  — | ]  }t        |j                  «       «      –— Œ y ­wr   )Úintr�   r%  s     r"   r’   z,ResultSet.completed_count.<locals>.<genexpr>—  s   è ø€ ÐG¹,°”3�v×(Ñ(Ó*×+¹,ùs   ‚#%)Úsumr[   rF   s    r"   Úcompleted_countzResultSet.completed_countŽ  s   € ô ÑG¸$¿,º,ÓGÓGÐGr!   c                 óF   — | j                   D ]  }|j                  «        Œ y)z?Forget about (and possible remove the result of) all the tasks.N)r[   r]   rS   s     r"   r]   zResultSet.forget™  s   € à—l”lˆFØ�M‰M�Oñ #r!   c                 ó¨   — | j                   j                  j                  | j                  D �cg c]  }|j                  ‘Œ c}|||||¬«       yc c}w )a[  Send revoke signal to all workers for all tasks in the set.

        Arguments:
            terminate (bool): Also terminate the process currently working
                on the task (if any).
            signal (str): Name of signal to send to process if terminate.
                Default is TERM.
            wait (bool): Wait for replies from worker.
                The ``timeout`` argument specifies the number of seconds
                to wait.  Disabled by default.
            timeout (float): Time in seconds to wait for replies when
                the ``wait`` argument is enabled.
        )r`   rd   ra   rb   rc   N)r:   re   rf   r[   r;   )rA   r`   ra   rb   rg   rd   r  s          r"   rf   zResultSet.revokež  sJ   € ð 	�‰×Ñ×Ñ¨t¯|ª|Ó <©|¨! §£¨|Ñ <Ø+5¸wØ*3¸FÈ$ð 	 õ 	PùÒ <s   ®Ac                 ó,   — t        | j                  «      S r   )rî   r[   rF   s    r"   Ú__iter__zResultSet.__iter__±  s   € Ü�D—L‘LÓ!Ð!r!   c                 ó    — | j                   |   S )z`res[i] -> res.results[i]`.r  )rA   Úindexs     r"   Ú__getitem__zResultSet.__getitem__´  s   € à�|‰|˜EÑ"Ð"r!   c	           
      óf   —  | j                   r| j                  n| j                  ||||||||¬«      S )zÆSee :meth:`join`.

        This is here for API compatibility with :class:`AsyncResult`,
        in addition it uses :meth:`join_native` if available for the
        current result backend.
        )rd   rp   rm   rN   ro   rq   rv   rn   )rá   Újoin_nativeÚjoin)	rA   rd   rp   rm   rN   ro   rq   rv   rn   s	            r"   rz   zResultSet.get¸  s=   € ð M D×$=Ò$=�× Ò À4Ç9Á9Ø yØ¨¸Ø!Ð9NØ#ô	
ð 	
r!   c	           	      ób  — |r
t        «        t        j                  «       }	d}
|�t        d«      ‚g }| j                  D ]n  }d}
|r*|t        j                  «       |	z
  z
  }
|
dk  rt        d«      ‚|j                  |
|||||¬«      }|r ||j                  |«       Œ^|j                  |«       Œp |S )aÓ  Gather the results of all tasks as a list in order.

        Note:
            This can be an expensive operation for result store
            backends that must resort to polling (e.g., database).

            You should consider using :meth:`join_native` if your backend
            supports it.

        Warning:
            Waiting for tasks within a task may lead to deadlocks.
            Please see :ref:`task-synchronous-subtasks`.

        Arguments:
            timeout (float): The number of seconds to wait for results
                before the operation times out.
            propagate (bool): If any of the tasks raises an exception,
                the exception will be re-raised when this flag is set.
            interval (float): Time to wait (in seconds) before retrying to
                retrieve a result from the set.  Note that this does not have
                any effect when using the amqp result store backend,
                as it does not use polling.
            callback (Callable): Optional callback to be called for every
                result received.  Must have signature ``(task_id, value)``
                No results will be returned by this function if a callback
                is specified.  The order of results is also arbitrary when a
                callback is used.  To get access to the result object for
                a particular id you'll have to generate an index first:
                ``index = {r.id: r for r in gres.results.values()}``
                Or you can create new result objects on the fly:
                ``result = app.AsyncResult(task_id)`` (both will
                take advantage of the backend cache anyway).
            no_ack (bool): Automatic message acknowledgment (Note that if this
                is set to :const:`False` then the messages
                *will not be acknowledged*).
            disable_sync_subtasks (bool): Disable tasks to wait for sub tasks
                this is the default configuration. CAUTION do not enable this
                unless you must.

        Raises:
            celery.exceptions.TimeoutError: if ``timeout`` isn't
                :const:`None` and the operation takes longer than ``timeout``
                seconds.
        Nz,Backend does not support on_message callbackg        zjoin operation timed out)rd   rp   rm   ro   rn   rv   )	r#   ÚtimeÚ	monotonicr   r[   r   rz   r;   rX   )rA   rd   rp   rm   rN   ro   rq   rv   rn   Ú
time_startÚ	remainingr[   rT   rI   s                 r"   rB  zResultSet.joinÈ  sÆ   € ñ^ !Ü!Ô#Ü—^‘^Ó%ˆ
Øˆ	àÐ!Ü&Ø>ó@ð @ð ˆØ—l”lˆFØˆIÙØ#¤t§~¡~Ó'7¸*Ñ'DÑE�	Ø Ò#Ü&Ð'AÓBÐBØ—J‘JØ!¨YØ!¨&¸kØ&;ð ó ˆEñ
 Ù˜Ÿ™ EÕ*à—‘˜uÕ%ð #ð ˆr!   c                 ó:   — | j                   j                  ||«      S r   ©r>   rL   rM   s       r"   rL   zResultSet.then  ó   € Ø�}‰}×!Ñ! (¨HÓ5Ð5r!   c                 óD   — | j                   j                  | |||||¬«      S )a0  Backend optimized version of :meth:`iterate`.

        .. versionadded:: 2.2

        Note that this does not support collecting the results
        for different task types using different backends.

        This is currently only supported by the amqp, Redis and cache
        result backends.
        )rd   rm   ro   rq   rn   )r<   Úiter_native)rA   rd   rm   ro   rq   rn   s         r"   rL  zResultSet.iter_native  s/   € ð �|‰|×'Ñ'ØØ h°vØ!¨{ð (ó 
ð 	
r!   c	                 óþ  — |r
t        «        |rdn2t        | j                  «      D �	�
ci c]  \  }	}
|
j                  |	“Œ c}
}	}|rdn!t	        t        | «      «      D �cg c]  }d‘Œ c}}| j                  |||||«      D ]p  \  }}t        |t        «      r)g }|D ]!  }|j                  |j                  «       «       Œ# n|d   }|r|d   t        j                  v r|‚|r
 |||«       Œi||||   <   Œr |S c c}
}	w c c}w )a-  Backend optimized version of :meth:`join`.

        .. versionadded:: 2.2

        Note that this does not support collecting the results
        for different task types using different backends.

        This is currently only supported by the amqp, Redis and cache
        result backends.
        NrT   r§   )r#   Ú	enumerater[   r;   ÚrangeÚlenrL  rÏ   r}   rX   rz   r   rx   )rA   rd   rp   rm   rN   ro   rq   rn   rv   ÚirT   Úorder_indexr‰   Úaccr÷   rè   rI   Úchildren_results                     r"   rA  zResultSet.join_native'  s  € ñ !Ü!Ô#Ù&‘dÜ*3°D·L±LÔ*Aô-
Ù*A™Y˜Q ˆF�I‰I�q‰LÐ*Aò-
ˆñ ‰d´5¼¸T»Ô3CÓ$DÑ3C¨a¢TÐ3CÑ$DˆØ!×-Ñ-¨g°xÀØ.8¸+öG‰MˆG�Tä˜$¤Ô%Ø�Û'+�OØ—L‘L ×!4Ñ!4Ó!6Õ7ñ (,ð ˜X™�Ù  h¡´6×3JÑ3JÑ!JØ�KÙÙ˜ %Õ(à,1��K Ñ(Ò)ðGð ˆ
ùó%-
ùò %Es   ©C4Á	C:c                 óœ   — d„  | j                   j                  | j                  D �ch c]  }|j                  ’Œ c}fddi|¤ŽD «       S c c}w )Nc              3   ó&   K  — | ]	  \  }}|–— Œ y ­wr   r    )r�   r‰   rè   s      r"   r’   z'ResultSet._iter_meta.<locals>.<genexpr>L  s   è ø€ ð ñ %
™˜˜D”ñ %
ùs   ‚Úmax_iterationsr   )r<   Úget_manyr[   r;   )rA   rˆ   r  s      r"   rï   zResultSet._iter_metaK  sR   € ñÐ$9 D§L¡L×$9Ñ$9ØŸ<š<Ó(™<�aˆQ�T‹T˜<Ñ(ñ%
Ø9:ð%
Ø>Dò%
ó ð 	ùÚ(s   §A	
c                 ó(   — d„ | j                   D «       S )Nc              3   ó¢   K  — | ]G  }|j                   j                  |j                  «      r |j                  t        j
                  v r|–— ŒI y ­wr   )r<   Ú	is_cachedr;   r™   r   rx   )r�   Úress     r"   r’   z0ResultSet._failed_join_report.<locals>.<genexpr>Q  s>   è ø€ ð 6™|˜Ø—;‘;×(Ñ(¨¯©Ô0Ø—	‘	œV×4Ñ4Ñ4ô ™|ùs   ‚AAr  rF   s    r"   Ú_failed_join_reportzResultSet._failed_join_reportP  s   € ñ6˜tŸ|š|ó 6ð 	6r!   c                 ó,   — t        | j                  «      S r   )rP  r[   rF   s    r"   Ú__len__zResultSet.__len__U  s   € Ü�4—<‘<Ó Ð r!   c                 ó`   — t        |t        «      r|j                  | j                  k(  S t        S r   )rÏ   r   r[   rÐ   rÑ   s     r"   rÓ   zResultSet.__eq__X  s%   € Ü�eœYÔ'Ø—=‘= D§L¡LÑ0Ð0ÜÐr!   c                 óz   — dt        | «      j                  › ddj                  d„ | j                  D «       «      › d�S )NrÊ   z: [ú, c              3   ó4   K  — | ]  }|j                   –— Œ y ­wr   rö   ©r�   r  s     r"   r’   z%ResultSet.__repr__.<locals>.<genexpr>^  s   è ø€ Ð4PÁ<¸a°Q·TµTÁ<ùó   ‚ú]>)r9   r/   rB  r[   rF   s    r"   rÍ   zResultSet.__repr__]  s7   € Ø”4˜“:×&Ñ&Ð' s¨4¯9©9Ñ4PÀ4Ç<Â<Ó4PÓ+PÐ*QÐQSÐTÐTr!   c                 óT   — 	 | j                   d   j                  S # t        $ r Y y w xY w©Nr   )r[   rá   Ú
IndexErrorrF   s    r"   rá   zResultSet.supports_native_join`  s-   € ð	Ø—<‘< ‘?×7Ñ7Ð7øÜò 	Ùð	ús   ‚ ›	'¦'c                 ó®   — | j                   €>| j                  r| j                  d   j                  nt        j                  «       | _         | j                   S rh  )r  r[   r:   r   Ú_get_current_objectrF   s    r"   r:   zResultSet.appg  s@   € à�9‰9ÐØ04·²˜Ÿ™ a™×,Ò,Ü$×8Ñ8Ó:ð ŒIà�y‰yÐr!   c                 ó   — || _         y r   )r  )rA   r:   s     r"   r:   zResultSet.appn  s	   € àˆ�	r!   c                 óx   — | j                   r| j                   j                  S | j                  d   j                  S rh  )r:   r<   r[   rF   s    r"   r<   zResultSet.backendr  s+   € à#'§8¢8ˆt�x‰x×ÑÐH°·±¸a±×1HÑ1HÐHr!   ©NNr,   r  )NTrk   NTNTNr%   )Nrk   TNN)NTrk   NTNNT)'r/   r0   r1   r2   r  r[   rC   r  r  r  r  r   r"  r�   r¡   rs   r  r1  r”   r8  r]   rf   r<  r?  rz   rB  rL   rL  rA  rï   r]  r_  rÓ   rÍ   r	  rá   r:   r
  r<   r    r!   r"   r   r   $  s:  „ ñð €Dð €GóCò*òò#òòIòòCò?óGð  €MòBò>ò	Hòð
 ?CØ#'óPò&"ò#ð :=Ø37Ø48ó
ð  ;>Ø48Ø59óHóT6ð >BØ15ó
ð$ 37Ø8<Ø15Ø*.ó"òHò
6ò
!òò
Uð ñó ðð ñó ðð 	‡Z�Zñó ðð ñIó ñIr!   r   c                   óœ   ‡ — e Zd ZdZdZdZdˆ fd„	Zˆ fd„Zdd„Zdd„Z	d„ Z
d„ Zd	„ ZeZd
„ Zd„ Zd„ Zd„ Zd„ Zed„ «       Zedd„«       Zˆ xZS )r   az  Like :class:`ResultSet`, but with an associated id.

    This type is returned by :class:`~celery.group`.

    It enables inspection of the tasks state and return values as
    a single entity.

    Arguments:
        id (str): The id of the group.
        results (Sequence[AsyncResult]): List of result instances.
        parent (ResultBase): Parent result of this group.
    Nc                 óB   •— || _         || _        t        ‰| �  |fi |¤Ž y r   )r;   r3   ÚsuperrC   )rA   r;   r[   r3   rˆ   rÕ   s        €r"   rC   zGroupResult.__init__Œ  s#   ø€ ØˆŒØˆŒÜ‰Ñ˜Ñ+ FÓ+r!   c                 óX   •— | j                   j                  | «       t        ‰| �  «        y r   )r<   rR   rq  r  )rA   rÕ   s    €r"   r  zGroupResult._on_ready‘  s    ø€ Ø�‰×*Ñ*¨4Ô0Ü‰ÑÕr!   c                 ój   — |xs | j                   j                  j                  | j                  | «      S )zãSave group-result for later retrieval using :meth:`restore`.

        Example:
            >>> def save_and_restore(result):
            ...     result.save()
            ...     result = GroupResult.restore(result.id)
        )r:   r<   Ú
save_groupr;   ©rA   r<   s     r"   ÚsavezGroupResult.save•  s*   € ð Ò+˜4Ÿ8™8×+Ñ+×7Ñ7¸¿¹ÀÓFÐFr!   c                 ój   — |xs | j                   j                  j                  | j                  «       y)z.Remove this result if it was previously saved.N)r:   r<   Údelete_groupr;   ru  s     r"   ÚdeletezGroupResult.deleteŸ  s#   € à	Ò	$�D—H‘H×$Ñ$×2Ñ2°4·7±7Õ;r!   c                 ó:   — | j                   | j                  «       fS r   rØ   rF   s    r"   rÚ   zGroupResult.__reduce__£  rÛ   r!   c                 ó2   — | j                   | j                  fS r   )r;   r[   rF   s    r"   rÙ   zGroupResult.__reduce_args__¦  s   € Ø�w‰w˜Ÿ™Ð$Ð$r!   c                 óH   — t        | j                  xs | j                  «      S r   )Úboolr;   r[   rF   s    r"   Ú__bool__zGroupResult.__bool__©  s   € Ü�D—G‘GÒ+˜tŸ|™|Ó,Ð,r!   c                 ó
  — t        |t        «      rO|j                  | j                  k(  xr4 |j                  | j                  k(  xr |j                  | j                  k(  S t        |t
        «      r|| j                  k(  S t        S r   )rÏ   r   r;   r[   r3   rÀ   rÐ   rÑ   s     r"   rÓ   zGroupResult.__eq__­  sl   € Ü�eœ[Ô)à—‘˜DŸG™GÑ#ò ,Ø—‘ §¡Ñ-ò,à—‘ §¡Ñ+ðô
 ˜œsÔ#Ø˜DŸG™GÑ#Ð#ÜÐr!   c           	      ó”   — dt        | «      j                  › d| j                  › ddj                  d„ | j                  D «       «      › d�S )NrÊ   rË   z [rb  c              3   ó4   K  — | ]  }|j                   –— Œ y ­wr   rö   rd  s     r"   r’   z'GroupResult.__repr__.<locals>.<genexpr>¹  s   è ø€ Ð>ZÉ\È¸q¿t½tÉ\ùre  rf  )r9   r/   r;   rB  r[   rF   s    r"   rÍ   zGroupResult.__repr__¸  sA   € Ø”4˜“:×&Ñ&Ð' r¨$¯'©'¨°"°T·Y±YÑ>ZÈTÏ\Ê\Ó>ZÓ5ZÐ4[Ð[]Ð^Ð^r!   c                 ó,   — t        | j                  «      S r¾   r¿   rF   s    r"   rÁ   zGroupResult.__str__»  rÂ   r!   c                 ó,   — t        | j                  «      S rÄ   rÅ   rF   s    r"   rÇ   zGroupResult.__hash__¿  rÈ   r!   c                 óÄ   — | j                   | j                  xr | j                  j                  «       f| j                  D �cg c]  }|j                  «       ‘Œ c}fS c c}w r   )r;   r3   rV   r[   )rA   r  s     r"   rV   zGroupResult.as_tupleÃ  sM   € à�W‰W�d—k‘kÒ< d§k¡k×&:Ñ&:Ó&<Ð=Ø#'§<¢<Ó0¡<˜aˆQ�Z‰Z�\ <Ñ0ð
ð 	
ùâ0s   ÁAc                 ó   — | j                   S r   r  rF   s    r"   r•   zGroupResult.childrenÉ  s   € à�|‰|Ðr!   c                 ó¤   — |xs, t        | j                  t        «      s| j                  nt        }|xs |j                  }|j                  |«      S )z&Restore previously saved group result.)rÏ   r:   r	  r   r<   Úrestore_group)Úclsr;   r<   r:   s       r"   ÚrestorezGroupResult.restoreÍ  sH   € ð ò 
Ü% c§g¡g¬xÔ8ˆC�GŠG¼kð 	ð Ò(˜SŸ[™[ˆØ×$Ñ$ RÓ(Ð(r!   )NNNr   rn  )r/   r0   r1   r2   r;   r[   rC   r  rv  ry  rÚ   rÙ   r~  Ú__nonzero__rÓ   rÍ   rÁ   rÇ   rV   r	  r•   Úclassmethodr‰  Ú__classcell__)rÕ   s   @r"   r   r   w  s�   ø„ ñð 
€Bð €Gõ,ô
óGó<ò6ò%ò-à€Kò	ò_òòò
ð ñó ðð ò)ó ô)r!   r   c                   ó´   — e Zd ZdZdd„Zdd„Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
	 	 dd
„ZeZd„ Zd„ Zd„ Zed„ «       Zed„ «       Zed„ «       ZeZed„ «       Zed„ «       Zy)r   z.Result that we know has already been executed.Nc                 óŠ   — || _         || _        || _        || _        || _        t        «       | _        | j                  | «       y r   )r;   Ú_resultÚ_stateÚ
_tracebackÚ_namer
   r>   )rA   r;   Ú	ret_valuer™   r¨   rú   s         r"   rC   zEagerResult.__init__Û  s<   € ð ˆŒØ ˆŒØˆŒØ#ˆŒØˆŒ
Ü›	ˆŒØ�‰�dÕr!   c                 ó:   — | j                   j                  ||«      S r   rI  rM   s       r"   rL   zEagerResult.thenæ  rJ  r!   c                 ó   — | j                   S r   )r?   rF   s    r"   r©   zEagerResult._get_task_metaé  s   € Ø�{‰{Ðr!   c                 ó:   — | j                   | j                  «       fS r   rØ   rF   s    r"   rÚ   zEagerResult.__reduce__ì  rÛ   r!   c                 ó^   — | j                   | j                  | j                  | j                  fS r   )r;   r�  r�  r‘  rF   s    r"   rÙ   zEagerResult.__reduce_args__ï  s!   € Ø—‘˜Ÿ™ t§{¡{°D·O±OÐDÐDr!   c                 ó2   — | j                  «       \  }} ||Ž S r   )rÚ   )rA   rˆ  r¥   s      r"   rÖ   zEagerResult.__copy__ò  s   € Ø—O‘OÓ%‰	ˆˆTÙ�DˆzÐr!   c                  ó   — yr,   r    rF   s    r"   r”   zEagerResult.readyö  s   € Ør!   c                 ó  — |r
t        «        | j                  «       r| j                  S | j                  t        j
                  v rI|r;t        | j                  t        «      r| j                  ‚t        | j                  «      ‚| j                  S y r   )r#   r�   rT   r™   r   rx   rÏ   Ú	Exception)rA   rd   rp   rv   rˆ   s        r"   rz   zEagerResult.getù  sr   € á Ü!Ô#à�?‰?ÔØ—;‘;ÐØ�Z‰Zœ6×2Ñ2Ñ2ÙÜ%/Ø—K‘K¤ô&,�d—k‘kð HÜ1:¸4¿;¹;Ó1GðHà—;‘;Ðð	 3r!   c                  ó   — y r   r    rF   s    r"   r]   zEagerResult.forget  s   € Ør!   c                 ó.   — t         j                  | _        y r   )r   ÚREVOKEDr�  r¤   s      r"   rf   zEagerResult.revoke
  s   € Ü—n‘nˆ�r!   c                 ó"   — d| j                   › d�S )Nz<EagerResult: rÌ   rö   rF   s    r"   rÍ   zEagerResult.__repr__  s   € Ø §¡˜y¨Ð*Ð*r!   c                 óv   — | j                   | j                  | j                  | j                  | j                  dœS )N)r÷   rT   r§   r¨   rú   )r;   r�  r�  r‘  r’  rF   s    r"   r?   zEagerResult._cache  s1   € ð —w‘wØ—l‘lØ—k‘kØŸ™Ø—J‘Jñ
ð 	
r!   c                 ó   — | j                   S )zThe tasks return value.)r�  rF   s    r"   rT   zEagerResult.result  s   € ð �|‰|Ðr!   c                 ó   — | j                   S )zThe tasks state.)r�  rF   s    r"   r™   zEagerResult.state  s   € ð �{‰{Ðr!   c                 ó   — | j                   S )z!The traceback if the task failed.)r‘  rF   s    r"   r¨   zEagerResult.traceback%  s   € ð �‰Ðr!   c                  ó   — yr%   r    rF   s    r"   rá   z EagerResult.supports_native_join*  s   € àr!   rn  r%   )NTT)r/   r0   r1   r2   rC   rL   r©   rÚ   rÙ   rÖ   r”   rz   rg   r]   rf   rÍ   r	  r?   rT   r™   r§   r¨   rá   r    r!   r"   r   r   ×  sµ   „ á8ó	ó6òò6òEòòð +/Ø"&óð €Dòò%ò+ð ñ
ó ð
ð ñó ðð ñó ðð €Fàñó ðð ñó ñr!   r   c           
      ó2  — t        |«      }|j                  }t        | t        «      sj| \  }}t        |t        t
        f«      r|n|df\  }}|rt        ||«      }|�,|j                  ||D �cg c]  }t        ||«      ‘Œ c}|¬«      S  |||¬«      S | S c c}w )zDeserialize result from tuple.Nr‚   )r   r   rÏ   r   r}   Útupler   r   )r  r:   ÚResultr\  Únodesr;   r3   r‘   s           r"   r   r   /  sª   € ô ˜Ó
€CØ�_‰_€FÜ�aœÔ$Ø‰
ˆˆUÜ& s¬T´5¨MÔ:‘SÀÀdÀ‰
ˆˆFÙÜ& v¨sÓ3ˆFàÐØ—?‘?ØÁÓFÁ°uÔ& u¨cÕ2ÀÑFØð #ó ð ñ
 �b Ô(Ð(Ø€Hùò Gs   Á,B
r   ).r2   r  rD  Úcollectionsr   Ú
contextlibr   Úweakrefr   Údateutil.parserr   Úkombu.utils.objectsr   Úviner   r	   r
   Ú r   r   r�  r   r   r:   r   Ú
exceptionsr   r   r   Úutils.graphr   r   r®   ÚImportErrorÚ__all__r   r#   r)   r-   r   Úregisterr   r   r   r   r   r    r!   r"   Ú<module>rµ     s5  ðÙ 9ã Û Ý Ý %Ý å $Ý /ß +Ñ +ç !ß CÝ ß LÑ Lß 8ðÛð€ð
€ò)ð
 ñ/ó ð/ð ñ/ó ð/÷ñ ð 
×Ñô\2�*ó \2ó ð\2ð~ 
×ÑôOI�
ó OIó ðOIðd
 
×Ñô\)�)ó \)ó ð\)ð~ 
×ÑôT�+ó Tó ðTônøðu  ò Ø‚Eðús   ÁC. Ã.C8Ã7C8