r4i@vddlZddlmZmZGddeZGddeZGddeZGd d e Z y) N)ABCMetaabstractmethodc"eZdZdZfdZxZS)JobLookupErrorzBRaised when the job store cannot find a job for update or removal.c,t|d|dy)NzNo job by the id of z was foundsuper__init__selfjob_id __class__s f/mnt/ssd/data/python-lab/DaemonControl/venv/lib/python3.12/site-packages/apscheduler/jobstores/base.pyr zJobLookupError.__init__s /xzBC__name__ __module__ __qualname____doc__r __classcell__rs@rrrsLDDrrc"eZdZdZfdZxZS)ConflictingIdErrorz8Raised when the uniqueness of job IDs is being violated.c,t|d|dy)NzJob identifier (z ) conflicts with an existing jobrr s rr zConflictingIdError.__init__s +F83STUrrrs@rrr sBVVrrc"eZdZdZfdZxZS)TransientJobErrorzs Raised when an attempt to add transient (with no func_ref) job to a persistent job store is detected. c,t|d|dy)NzJob (z`) cannot be added to this job store because a reference to the callable could not be determined.rr s rr zTransientJobError.__init__s! F8' ' rrrs@rrrs   rrceZdZdZdZdZejdZdZ dZ dZ e dZ e dZe d Ze d Ze d Ze d Ze d Ze dZdZy) BaseJobStorezSAbstract base class that defines the interface that every job store must implement.Nzapscheduler.jobstorescZ||_||_tjd||_y)ax 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 zapscheduler.jobstores.N) _scheduler_aliaslogging getLogger_logger)r scheduleraliass rstartzBaseJobStore.start's,$ ((+A%)IJ rcy)z2Frees any resources still bound to this job store.Nr s rshutdownzBaseJobStore.shutdown5rct|D]3\}}|j|dkDr|d|}|d|=|j|yy)Nr) enumerate next_run_timeextend)r jobsijob paused_jobss r_fix_paused_jobs_sortingz%BaseJobStore._fix_paused_jobs_sorting8sQo FAs  ,q5"&r(KRaRKK ,  rcy)aG 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_jobzBaseJobStore.lookup_jobAr-rcy)a 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_jobszBaseJobStore.get_due_jobsMr-rcy)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*r+s rget_next_run_timezBaseJobStore.get_next_run_timeWr-rcy)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*r+s r get_all_jobszBaseJobStore.get_all_jobs`r-rcy)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 r4s radd_jobzBaseJobStore.add_jobmr-rcy)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*rBs r update_jobzBaseJobStore.update_jobvr-rcy)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*r8s r remove_jobzBaseJobStore.remove_jobr-rcy)z!Removes all jobs from this store.Nr*r+s rremove_all_jobszBaseJobStore.remove_all_jobsr-rc6d|jjdS)N<>)rrr+s r__repr__zBaseJobStore.__repr__s4>>**+1--r)rrrrr!r"r#r$r%r(r,r6rr9r<r>r@rCrErGrIrMr*rrrr s]J Fg 78G KA                  00.rr) metaclass) r#abcrrKeyErrorrr ValueErrorrrr*rrrRsA'DXDVV   m.Wm.r