
    i@                     p    S SK r S SKJrJr   " S S\5      r " S S\5      r " S S\5      r " S	 S
\S9r	g)    N)ABCMetaabstractmethodc                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )JobLookupError   zBRaised when the job store cannot find a job for update or removal.c                 ,   > [         TU ]  SU S35        g )NzNo job by the id of z
 was foundsuper__init__selfjob_id	__class__s     G/app/mltbenv/lib/python3.13/site-packages/apscheduler/jobstores/base.pyr   JobLookupError.__init__   s    /xzBC     __name__
__module____qualname____firstlineno____doc__r   __static_attributes____classcell__r   s   @r   r   r      s    LD Dr   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )ConflictingIdError   z8Raised when the uniqueness of job IDs is being violated.c                 ,   > [         TU ]  SU S35        g )NzJob identifier (z ) conflicts with an existing jobr	   r   s     r   r   ConflictingIdError.__init__   s    +F83STUr   r   r   r   s   @r   r   r      s    BV Vr   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )TransientJobError   zg
Raised when an attempt to add transient (with no func_ref) job to a persistent job store is
detected.
c                 ,   > [         TU ]  SU S35        g )NzJob (z`) cannot be added to this job store because a reference to the callable could not be determined.r	   r   s     r   r   TransientJobError.__init__   s!    F8 ' '	
r   r   r   r   s   @r   r#   r#      s    

 
r   r#   c                       \ rS rSrSrSrSr\R                  " S5      r	S r
S rS r\S 5       r\S	 5       r\S
 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       rS rSrg)BaseJobStore    zSAbstract base class that defines the interface that every job store must implement.Nzapscheduler.jobstoresc                 X    Xl         X l        [        R                  " SU 35      U l        g)aH  
Called by the scheduler when the scheduler is being started or when the job store is being
added to an already running scheduler.

:param apscheduler.schedulers.base.BaseScheduler scheduler: the scheduler that is starting
    this job store
:param str|unicode alias: alias of this job store as it was assigned to the scheduler
zapscheduler.jobstores.N)
_scheduler_aliaslogging	getLogger_logger)r   	scheduleraliass      r   startBaseJobStore.start'   s(     $((+A%)IJr   c                     g)z2Frees any resources still bound to this job store.Nr   r   s    r   shutdownBaseJobStore.shutdown5       r   c                     [        U5       H5  u  p#UR                  c  M  US:  a  US U nUS U2	 UR                  U5          g    g )Nr   )	enumeratenext_run_timeextend)r   jobsijobpaused_jobss        r   _fix_paused_jobs_sorting%BaseJobStore._fix_paused_jobs_sorting8   sJ    oFA  ,q5"&r(KRaRKK, &r   c                     g)a  
Returns a specific job, or ``None`` if it isn't found..

The job store is responsible for setting the ``scheduler`` and ``jobstore`` attributes of
the returned job to point to the scheduler and itself, respectively.

:param str|unicode job_id: identifier of the job
:rtype: Job
Nr   r   r   s     r   
lookup_jobBaseJobStore.lookup_jobA   r8   r   c                     g)z
Returns the list of jobs that have ``next_run_time`` earlier or equal to ``now``.
The returned jobs must be sorted by next run time (ascending).

:param datetime.datetime now: the current (timezone aware) datetime
:rtype: list[Job]
Nr   )r   nows     r   get_due_jobsBaseJobStore.get_due_jobsM   r8   r   c                     g)z
Returns the earliest run time of all the jobs stored in this job store, or ``None`` if
there are no active jobs.

:rtype: datetime.datetime
Nr   r5   s    r   get_next_run_timeBaseJobStore.get_next_run_timeW   r8   r   c                     g)a_  
Returns a list of all jobs in this job store.
The returned jobs should be sorted by next run time (ascending).
Paused jobs (next_run_time == None) should be sorted last.

The job store is responsible for setting the ``scheduler`` and ``jobstore`` attributes of
the returned jobs to point to the scheduler and itself, respectively.

:rtype: list[Job]
Nr   r5   s    r   get_all_jobsBaseJobStore.get_all_jobs`   r8   r   c                     g)z
Adds the given job to this store.

:param Job job: the job to add
:raises ConflictingIdError: if there is another job in this store with the same ID
Nr   r   r?   s     r   add_jobBaseJobStore.add_jobm   r8   r   c                     g)z
Replaces the job in the store with the given newer version.

:param Job job: the job to update
:raises JobLookupError: if the job does not exist
Nr   rR   s     r   
update_jobBaseJobStore.update_jobv   r8   r   c                     g)z
Removes the given job from this store.

:param str|unicode job_id: identifier of the job
:raises JobLookupError: if the job does not exist
Nr   rD   s     r   
remove_jobBaseJobStore.remove_job   r8   r   c                     g)z!Removes all jobs from this store.Nr   r5   s    r   remove_all_jobsBaseJobStore.remove_all_jobs   r8   r   c                 6    SU R                   R                   S3$ )N<>)r   r   r5   s    r   __repr__BaseJobStore.__repr__   s    4>>**+1--r   )r,   r/   r+   )r   r   r   r   r   r+   r,   r-   r.   r/   r2   r6   rA   r   rE   rI   rL   rO   rS   rV   rY   r\   ra   r   r   r   r   r(   r(       s    ]JF 78GKA 	 	     
 
       0 0.r   r(   )	metaclass)
r-   abcr   r   KeyErrorr   r   
ValueErrorr#   r(   r   r   r   <module>rg      sA     'DX DV V


 

m.W m.r   