summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/apscheduler/_structures.py89
-rw-r--r--src/apscheduler/schedulers/async_.py5
-rw-r--r--src/apscheduler/schedulers/sync.py5
3 files changed, 48 insertions, 51 deletions
diff --git a/src/apscheduler/_structures.py b/src/apscheduler/_structures.py
index 3d3aed5..6ceaaf6 100644
--- a/src/apscheduler/_structures.py
+++ b/src/apscheduler/_structures.py
@@ -30,11 +30,11 @@ class Task:
"""
Represents a callable and its surrounding configuration parameters.
- :ivar id: the unique identifier of this task
- :ivar func: the callable that is called when this task is run
- :ivar max_running_jobs: maximum number of instances of this task that are allowed
+ :param id: the unique identifier of this task
+ :param func: the callable that is called when this task is run
+ :param max_running_jobs: maximum number of instances of this task that are allowed
to run concurrently
- :ivar misfire_grace_time: maximum number of seconds the run time of jobs created
+ :param misfire_grace_time: maximum number of seconds the run time of jobs created
for this task are allowed to be late, compared to the scheduled run time
"""
@@ -66,26 +66,25 @@ class Schedule:
"""
Represents a schedule on which a task will be run.
- :ivar id: the unique identifier of this schedule
- :ivar task_id: unique identifier of the task to be run on this schedule
- :ivar args: positional arguments to pass to the task callable
- :ivar kwargs: keyword arguments to pass to the task callable
- :ivar coalesce: if ``True``, only one job will be created when the schedule is
- due even if multiple run times have passed since the last processing of the
- schedule
- :ivar misfire_grace_time: maximum number of seconds the scheduled job's actual
+ :param id: the unique identifier of this schedule
+ :param task_id: unique identifier of the task to be run on this schedule
+ :param args: positional arguments to pass to the task callable
+ :param kwargs: keyword arguments to pass to the task callable
+ :param coalesce: determines what to do when processing the schedule if multiple
+ fire times have become due for this schedule since the last processing
+ :param misfire_grace_time: maximum number of seconds the scheduled job's actual
run time is allowed to be late, compared to the scheduled run time
- :ivar max_jitter: maximum number of seconds to randomly add to the scheduled
+ :param max_jitter: maximum number of seconds to randomly add to the scheduled
time for each job created from this schedule
- :ivar tags: strings that can be used to categorize and filter the schedule and
+ :param tags: strings that can be used to categorize and filter the schedule and
its derivative jobs
- :ivar conflict_policy: determines what to do if a schedule with the same ID
+ :param conflict_policy: determines what to do if a schedule with the same ID
already exists in the data store
- :ivar next_fire_time: the next time the task will be run
- :ivar last_fire_time: the last time the task was scheduled to run
- :ivar acquired_by: ID of the scheduler that has acquired this schedule for
+ :param next_fire_time: the next time the task will be run
+ :param last_fire_time: the last time the task was scheduled to run
+ :param acquired_by: ID of the scheduler that has acquired this schedule for
processing
- :ivar acquired_until: the time after which other schedulers are free to acquire the
+ :param acquired_until: the time after which other schedulers are free to acquire the
schedule for processing even if it is still marked as acquired
"""
@@ -147,24 +146,24 @@ class Job:
"""
Represents a queued request to run a task.
- :ivar id: autogenerated unique identifier of the job
- :ivar task_id: unique identifier of the task to be run
- :ivar args: positional arguments to pass to the task callable
- :ivar kwargs: keyword arguments to pass to the task callable
- :ivar schedule_id: unique identifier of the associated schedule
+ :param id: autogenerated unique identifier of the job
+ :param task_id: unique identifier of the task to be run
+ :param args: positional arguments to pass to the task callable
+ :param kwargs: keyword arguments to pass to the task callable
+ :param schedule_id: unique identifier of the associated schedule
(if the job was derived from a schedule)
- :ivar scheduled_fire_time: the time the job was scheduled to run at
+ :param scheduled_fire_time: the time the job was scheduled to run at
(if the job was derived from a schedule; includes jitter)
- :ivar jitter: the time that was randomly added to the calculated scheduled run time
+ :param jitter: the time that was randomly added to the calculated scheduled run time
(if the job was derived from a schedule)
- :ivar start_deadline: if the job is started in the worker after this time, it is
+ :param start_deadline: if the job is started in the worker after this time, it is
considered to be misfired and will be aborted
- :ivar tags: strings that can be used to categorize and filter the job
- :ivar created_at: the time at which the job was created
- :ivar started_at: the time at which the execution of the job was started
- :ivar acquired_by: the unique identifier of the worker that has acquired the job
+ :param tags: strings that can be used to categorize and filter the job
+ :param created_at: the time at which the job was created
+ :param started_at: the time at which the execution of the job was started
+ :param acquired_by: the unique identifier of the worker that has acquired the job
for execution
- :ivar acquired_until: the time after which other workers are free to acquire the
+ :param acquired_until: the time after which other workers are free to acquire the
job for processing even if it is still marked as acquired
"""
@@ -225,15 +224,15 @@ class JobInfo:
This information is available in the thread or task where a job is currently being
run, available from :data:`~apscheduler.current_job`.
- :ivar job_id: the unique identifier of the job
- :ivar task_id: the unique identifier of the task that is being run
- :ivar schedule_id: the unique identifier of the schedule that the job was derived
+ :param job_id: the unique identifier of the job
+ :param task_id: the unique identifier of the task that is being run
+ :param schedule_id: the unique identifier of the schedule that the job was derived
from (if any)
- :ivar jitter: the time that was randomly added to the calculated scheduled run time
+ :param jitter: the time that was randomly added to the calculated scheduled run time
(if the job was derived from a schedule)
- :ivar start_deadline: if the job is started in the worker after this time, it is
+ :param start_deadline: if the job is started in the worker after this time, it is
considered to be misfired and will be aborted
- :ivar tags: strings that can be used to categorize and filter the job
+ :param tags: strings that can be used to categorize and filter the job
"""
job_id: UUID
@@ -262,12 +261,12 @@ class JobResult:
"""
Represents the result of running a job.
- :ivar job_id: the unique identifier of the job
- :ivar outcome: indicates how the job ended
- :ivar finished_at: the time when the job ended
- :ivar exception: the exception object if the job ended due to an exception being
+ :param job_id: the unique identifier of the job
+ :param outcome: indicates how the job ended
+ :param finished_at: the time when the job ended
+ :param exception: the exception object if the job ended due to an exception being
raised
- :ivar return_value: the return value from the task function (if the job ran to
+ :param return_value: the return value from the task function (if the job ran to
completion successfully)
"""
@@ -312,8 +311,8 @@ class RetrySettings:
"""
Settings for retrying an operation with Tenacity.
- :ivar stop: defines when to stop trying
- :ivar wait: defines how long to wait between attempts
+ :param stop: defines when to stop trying
+ :param wait: defines how long to wait between attempts
"""
stop: tenacity.stop.stop_base = attrs.field(
diff --git a/src/apscheduler/schedulers/async_.py b/src/apscheduler/schedulers/async_.py
index b6cc946..bc99567 100644
--- a/src/apscheduler/schedulers/async_.py
+++ b/src/apscheduler/schedulers/async_.py
@@ -116,9 +116,8 @@ class AsyncScheduler:
based ID will be assigned)
:param args: positional arguments to be passed to the task function
:param kwargs: keyword arguments to be passed to the task function
- :param coalesce: if ``True``, only one job will be created when the schedule is
- due even if multiple run times have passed since the last processing of the
- schedule
+ :param coalesce: determines what to do when processing the schedule if multiple
+ fire times have become due for this schedule since the last processing
:param misfire_grace_time: maximum number of seconds the scheduled job's actual
run time is allowed to be late, compared to the scheduled run time
:param max_jitter: maximum number of seconds to randomly add to the scheduled
diff --git a/src/apscheduler/schedulers/sync.py b/src/apscheduler/schedulers/sync.py
index 42a20dc..e64d43c 100644
--- a/src/apscheduler/schedulers/sync.py
+++ b/src/apscheduler/schedulers/sync.py
@@ -144,9 +144,8 @@ class Scheduler:
based ID will be assigned)
:param args: positional arguments to be passed to the task function
:param kwargs: keyword arguments to be passed to the task function
- :param coalesce: if ``True``, only one job will be created when the schedule is
- due even if multiple run times have passed since the last processing of the
- schedule
+ :param coalesce: determines what to do when processing the schedule if multiple
+ fire times have become due for this schedule since the last processing
:param misfire_grace_time: maximum number of seconds the scheduled job's actual
run time is allowed to be late, compared to the scheduled run time
:param max_jitter: maximum number of seconds to randomly add to the scheduled