
P'^c           @@  s  d  Z  d d l m Z d d l Z d d l m Z d d l m Z m Z m	 Z	 m
 Z
 d d d	 d
 d d d d d d d d d d d d d d d d d d d d g Z d Z d e f d      YZ d e f d!     YZ d" e f d#     YZ d e f d$     YZ e Z d
 e f d%     YZ d	 e f d&     YZ d e f d'     YZ d e f d(     YZ d e f d)     YZ d e f d*     YZ d e f d+     YZ d e f d,     YZ e Z d e f d-     YZ d e  f d.     YZ! d e  f d/     YZ" d e f d0     YZ# d1 e f d2     YZ$ d e f d3     YZ% d e& f d4     YZ' d e( f d5     YZ) d e  f d6     YZ* d e  f d7     YZ+ d S(8   so   
    celery.exceptions
    ~~~~~~~~~~~~~~~~~

    This module contains all exceptions used by the Celery API.

i    (   t   absolute_importNi   (   t   string_t(   t   SoftTimeLimitExceededt   TimeLimitExceededt   WorkerLostErrort
   Terminatedt   SecurityErrort   Ignoret   QueueNotFoundt   WorkerShutdownt   WorkerTerminatet   ImproperlyConfiguredt   NotRegisteredt   AlreadyRegisteredt   TimeoutErrort   MaxRetriesExceededErrort   Retryt   TaskRevokedErrort   NotConfiguredt   AlwaysEagerIgnoredt   InvalidTaskErrort
   ChordErrort   CPendingDeprecationWarningt   CDeprecationWarningt   FixupWarningt   DuplicateNodenameWarningR   R   R   R   sC   Task of kind {0} is not registered, please make sure it's imported.c           B@  s   e  Z d  Z RS(   s9   Security related exceptions.

    Handle with care.

    (   t   __name__t
   __module__t   __doc__(    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR   "   s   c           B@  s   e  Z d  Z RS(   s4   A task can raise this to ignore doing state updates.(   R   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR   *   s   t   Rejectc           B@  s&   e  Z d  Z d e d  Z d   Z RS(   s@   A task can raise this if it wants to reject/requeue the message.c         C@  s/   | |  _  | |  _ t t |   j | |  d  S(   N(   t   reasont   requeuet   superR   t   __init__(   t   selfR   R   (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR!   1   s    		c         C@  s   d |  j  |  j f S(   Ns   reject requeue=%s: %s(   R   R   (   R"   (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyt   __repr__6   s    N(   R   R   R   t   Nonet   FalseR!   R#   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR   .   s   c           B@  s   e  Z d  Z RS(   s5   Signals that the worker should terminate immediately.(   R   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR
   :   s   c           B@  s   e  Z d  Z RS(   s7   Signals that the worker should perform a warm shutdown.(   R   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR	   ?   s   c           B@  s   e  Z d  Z RS(   s,   Task routed to a queue not in CELERY_QUEUES.(   R   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR   C   s   c           B@  s   e  Z d  Z RS(   s(   Celery is somehow improperly configured.(   R   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR   G   s   c           B@  s   e  Z d  Z d   Z RS(   s   The task is not registered.c         C@  s   t  j |   S(   N(   t   UNREGISTERED_FMTt   format(   R"   (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR#   N   s    (   R   R   R   R#   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR   K   s   c           B@  s   e  Z d  Z RS(   s   The task is already registered.(   R   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR   R   s   c           B@  s   e  Z d  Z RS(   s   The operation timed out.(   R   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR   V   s   c           B@  s   e  Z d  Z RS(   s.   The tasks max restart limit has been exceeded.(   R   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR   Z   s   c           B@  sM   e  Z d  Z d Z d Z d Z d d d d  Z d   Z d   Z	 d   Z
 RS(   s    The task is to be retried later.c         K@  s   d d l  m } | |  _ t | t  r> d  | |  _ |  _ n% | | rS | |  n d  |  _ |  _ | |  _ t	 j
 |  | | |  d  S(   Ni    (   t	   safe_repr(   t   kombu.utils.encodingR(   t   messaget
   isinstanceR   R$   t   exct   excst   whent	   ExceptionR!   (   R"   R*   R,   R.   t   kwargsR(   (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR!   k   s    	%	c         C@  s/   t  |  j t j  r" d j |   Sd j |   S(   Ns   in {0.when}ss   at {0.when}(   R+   R.   t   numberst   RealR'   (   R"   (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyt   humanizeu   s    c         C@  sE   |  j  r |  j  S|  j r2 d j |  j   |  j  Sd j |  j    S(   Ns   Retry {0}: {1}s	   Retry {0}(   R*   R-   R'   R3   (   R"   (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyt   __str__z   s
    		c         C@  s   |  j  |  j |  j |  j f f S(   N(   t	   __class__R*   R-   R.   (   R"   (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyt
   __reduce__   s    N(   R   R   R   R$   R*   R,   R.   R!   R3   R4   R6   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR   ^   s   
		c           B@  s   e  Z d  Z RS(   s2   The task has been revoked, so no result available.(   R   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR      s   c           B@  s   e  Z d  Z RS(   sC   Celery has not been configured, as no config module has been found.(   R   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR      s   c           B@  s   e  Z d  Z RS(   s,   send_task ignores CELERY_ALWAYS_EAGER option(   R   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR      s   c           B@  s   e  Z d  Z RS(   s9   The task has invalid data or is not properly constructed.(   R   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR      s   t   IncompleteStreamc           B@  s   e  Z d  Z RS(   sD   Found the end of a stream of data, but the data is not yet complete.(   R   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR7      s   c           B@  s   e  Z d  Z RS(   s-   A task part of the chord raised an exception.(   R   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR      s   c           B@  s   e  Z RS(    (   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR      s   c           B@  s   e  Z RS(    (   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR      s   c           B@  s   e  Z RS(    (   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR      s   c           B@  s   e  Z d  Z RS(   s-   Multiple workers are using the same nodename.(   R   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyR      s   (,   R   t
   __future__R    R1   t   fiveR   t   billiard.exceptionsR   R   R   R   t   __all__R&   R/   R   R   R   t
   SystemExitR
   t   SystemTerminateR	   t   KeyErrorR   t   ImportErrorR   R   R   R   R   R   t   RetryTaskErrorR   t   UserWarningR   R   R   R7   R   t   PendingDeprecationWarningR   t   DeprecationWarningR   R   R   (    (    (    s3   /tmp/pip-unpacked-wheel-gV1wwp/celery/exceptions.pyt   <module>   sL   "								%