+
    Tj              	          ^ RI HtHtHt ^ RIHt ^ RIHtHt ^ RIH	t	H
t
HtHt ^ RIHtHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^R
IHt Rt^ tRt^dtRt0 R mt ! R R]4      t ]! RRRR7       ! R R4      4       t!R!R]R]R]RR/R llt"]! RRRR7       ! R R4      4       t#]! RRRR7       ! R R4      4       t$]! RRRR7       ! R R4      4       t%R# )"    )	dataclassfieldreplace)datetime)isclassiscoroutinefunction)AnyCallableDictOptional)async_to_syncsync_to_async)TextChoices)normalize_json)import_string)pgettext_lazy)TaskResultMismatchdefaultc                   n    ] tR t^ tR]! RR4      3tR]! RR4      3tR]! RR4      3tR]! RR	4      3tR
t	R# )TaskResultStatusREADYTaskReadyRUNNINGRunningFAILEDFailed
SUCCESSFUL
Successful N)
__name__
__module____qualname____firstlineno__r   r   r   r   r   __static_attributes__r        F/var/www/idalgo/venv/lib/python3.14/site-packages/django/tasks/base.pyr   r       sF    mFG45E-	:;Gfh78Ffl CDJr&   r   T)frozenslotskw_onlyc                      a  ] tR t^+t o RtR t]R 4       tRRRRRRRR/R	 ltR
 t	R t
R tR tR tR tR t]R 4       tV 3R ltRtV tR# )r   Fc                D    V P                  4       P                  V 4       R # N)get_backendvalidate_taskselfs   &r'   __post_init__Task.__post_init__6   s    ((.r&   c                .    V P                   P                  # r-   )funcr!   r0   s   &r'   name	Task.name9   s    yy!!!r&   priorityN
queue_name	run_afterbackendc               ^    / pVe   WR&   Ve   W%R&   Ve   W5R&   Ve   WER&   \        V 3/ VB # )z)Create a new Task with modified defaults.r8   r9   r:   r;   )r   )r1   r8   r9   r:   r;   changess   &$$$$ r'   using
Task.using=   sQ     "*J!$.L! #,K !(It'w''r&   c                B    V P                  4       P                  WV4      # )!Queue up the Task to be executed.)r.   enqueuer1   argskwargss   &*,r'   rB   Task.enqueueR   s    !))$f==r&   c                ^   "   V P                  4       P                  WV4      G Rj  xL
 #  L5i)rA   N)r.   aenqueuerC   s   &*,r'   rH   Task.aenqueueV   s'     %%'00VDDDDs   $-+-c                    V P                  4       P                  V4      pVP                  P                  V P                  8w  d%   \	        RVP                  P
                  : R24      hV# )z
Retrieve a task result by id.

Raise TaskResultDoesNotExist if such result does not exist, or raise
TaskResultMismatch if the result exists but belongs to another Task.
Task does not match (received ))r.   
get_resulttaskr5   r   module_pathr1   	result_idresults   && r'   rM   Task.get_resultZ   s^     !!#..y9;;tyy($01H1H0K1M  r&   c                   "   V P                  4       P                  V4      G Rj  xL
 pVP                  P                  V P                  8w  d%   \	        RVP                  P
                  : R24      hV#  LO5i)zSee get_result().NrK   rL   )r.   aget_resultrN   r5   r   rO   rP   s   && r'   rU   Task.aget_resulth   sh     '')55i@@;;tyy($01H1H0K1M   As   #A7A5AA7c                    \        V P                  4      '       d   \        V P                  4      ! V/ VB # V P                  ! V/ VB # r-   )r   r5   r   rC   s   &*,r'   call	Task.callq   s>    tyy)) +T<V<<yy$)&))r&   c                   "   \        V P                  4      '       d   V P                  ! V/ VB G R j  xL
 # \        V P                  4      ! V/ VB G R j  xL
 #  L' L5ir-   )r   r5   r   rC   s   &*,r'   acall
Task.acallv   sO     tyy))D3F333"499-t>v>>> 4>s!   1AA"AAAAc                2    ^RI Hp WP                  ,          # )   task_backends) r`   r;   )r1   r`   s   & r'   r.   Task.get_backend{   s    #\\**r&   c                `    V P                   P                   R V P                   P                   2# ).)r5   r"   r#   r0   s   &r'   rO   Task.module_path   s)    ))&&'q)?)?(@AAr&   c                r   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[;R&   S[;R&   S[S[,          ;R&   S[;R&   # )   r8   r5   r;   r9   r:   takes_context)intr
   strr   r   bool)format__classdict__s   "r'   __annotate__Task.__annotate__+   sR     M  N  L	 
 O  !!   r&   r    )r!   r"   r#   r$   rh   r2   propertyr6   r>   rB   rH   rM   rU   rX   r[   r.   rO   __annotate_func__r%   __classdictcell__rm   s   @r'   r   r   +   s       M/ " "( ( 	(
 ( (*>E*
?
+
 B Bm  r&   r   Nr8   r9   r;   rh   Fc                P   aaaaa ^RI Ho VVVVV3R lpV '       d	   V! V 4      # V# )r^   r_   c           	      @   < SS,          P                  SV SSSR R7      # )N)r8   r5   r9   r;   rh   r:   )
task_class)fr;   r8   r9   rh   r`   s   &r'   wrappertask.<locals>.wrapper   s2    W%00!' 1 
 	
r&   )ra   r`   )functionr8   r9   r;   rh   rx   r`   s   &dddd @r'   rN   rN      s'      
 
 x  Nr&   c                   <   a  ] tR t^t o ]R 4       tV 3R ltRtV tR# )	TaskErrorc                    \        V P                  4      p\        V4      '       d   \        V\        4      '       g   \        V P                  : R 24      hV# )z& does not reference a valid exception.)r   exception_class_pathr   
issubclassBaseException
ValueError)r1   exception_classs   & r'   r   TaskError.exception_class   sY     ((A(AB''z]0
 0
 ,,//UV  r&   c                2   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   # )rg   r~   	traceback)rj   )rl   rm   s   "r'   rn   TaskError.__annotate__   s       N r&   r    N)	r!   r"   r#   r$   rp   r   rq   r%   rr   rs   s   @r'   r|   r|      s      
 
 
  r&   r|   c                      a  ] tR t^t o ]! RRR7      tR t]R 4       t]R 4       t	]R 4       t
R tR	 tV 3R
 ltRtV tR# )
TaskResultFN)initr   c                    \         P                  V R \        V P                  4      4       \         P                  V R\        V P                  4      4       R# )rD   rE   N)object__setattr__r   rD   rE   r0   s   &r'   r2   TaskResult.__post_init__   s8    4		)BC4>$+++FGr&   c                    V P                   \        P                  8X  d   V P                  # V P                   \        P                  8X  d   \        R4      h\        R4      h)z
The return value of the task.

If the task didn't succeed, an exception is raised.
This is to distinguish against the task returning None.
zTask failedzTask has not finished yet)statusr   r   _return_valuer   r   r0   s   &r'   return_valueTaskResult.return_value   sM     ;;*555%%%[[,333]++899r&   c                \    V P                   \        P                  \        P                  09   # r-   )r   r   r   r   r0   s   &r'   is_finishedTaskResult.is_finished   s$    {{/668H8S8STTTr&   c                ,    \        V P                  4      # r-   )len
worker_idsr0   s   &r'   attemptsTaskResult.attempts   s    4??##r&   c           	         V P                   P                  4       P                  V P                  4      p\         F"  p\
        P                  W\        W4      4       K$  	  R# )z0Reload the cached task data from the task store.N)rN   r.   rM   idTASK_REFRESH_ATTRSr   r   getattrr1   refreshed_taskattrs   &  r'   refreshTaskResult.refresh   sB    ..0;;DGGD&Dt7>+HI 'r&   c           	        "   V P                   P                  4       P                  V P                  4      G Rj  xL
 p\         F"  p\
        P                  W\        W4      4       K$  	  R#  L25i)z1
Reload the cached task data from the task store
N)rN   r.   rU   r   r   r   r   r   r   s   &  r'   arefreshTaskResult.arefresh   sP       $yy446BB477KK&Dt7>+HI ' Ls   7A.A,3A.c                <  < V ^8  d   Qh/ S[ ;R&   S[;R&   S[;R&   S[S[,          ;R&   S[S[,          ;R&   S[S[,          ;R&   S[S[,          ;R&   S[;R&   S[S[S[3,          ;R	&   S[;R
&   S[S[,          ;R&   S[S[,          ;R&   S[S[,          ;R&   # )rg   rN   r   r   enqueued_at
started_atfinished_atlast_attempted_atrD   rE   r;   errorsr   r   )	r   rj   r   r   r   listr   r	   r|   )rl   rm   s   "r'   rn   TaskResult.__annotate__   s     
J  	G	 
   (##  ""  (##   ))  J  cN  L   O! " S	# & C=B' r&   r    )r!   r"   r#   r$   r   r   r2   rp   r   r   r   r   r   rq   r%   rr   rs   s   @r'   r   r      sk     & $)eT#BMH : : U U $ $JJo  r&   r   c                   <   a  ] tR t^t o ]R 4       tV 3R ltRtV tR# )TaskContextc                .    V P                   P                  # r-   )task_resultr   r0   s   &r'   attemptTaskContext.attempt   s    (((r&   c                &   < V ^8  d   Qh/ S[ ;R&   # )rg   r   )r   )rl   rm   s   "r'   rn   TaskContext.__annotate__   s      r&   r    N)	r!   r"   r#   r$   rp   r   rq   r%   rr   rs   s   @r'   r   r      s       ) )  r&   r   i>   r   r   r   r   r   r   r   r   r-   )&dataclassesr   r   r   r   inspectr   r   typingr	   r
   r   r   asgiref.syncr   r   django.db.models.enumsr   django.utils.jsonr   django.utils.module_loadingr   django.utils.translationr   
exceptionsr   DEFAULT_TASK_BACKEND_ALIASDEFAULT_TASK_PRIORITYDEFAULT_TASK_QUEUE_NAMETASK_MAX_PRIORITYTASK_MIN_PRIORITYr   r   r   rN   r|   r   r   r    r&   r'   <module>r      s   1 1  0 0 0 5 . , 5 2 *&  #   	 E{ E $dD1VB VB 2VBr # '	
 ' 2 $dD1  2$ $dD1<J <J 2<J~ $dD1) ) 2)r&   