summaryrefslogtreecommitdiff
path: root/src/apscheduler/_enums.py
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2022-09-21 01:56:32 +0300
committerAlex Grönholm <alex.gronholm@nextday.fi>2022-09-21 02:40:02 +0300
commite8055bce55bb004168b5787f89091057cf1f36c7 (patch)
treec8c377a4a8301e643efc939cea86138b8d72e95d /src/apscheduler/_enums.py
parentc5727432736b55b7d76753307f14efdb962c2edf (diff)
downloadapscheduler-e8055bce55bb004168b5787f89091057cf1f36c7.tar.gz
Merged the Worker class into AsyncScheduler
Diffstat (limited to 'src/apscheduler/_enums.py')
-rw-r--r--src/apscheduler/_enums.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/apscheduler/_enums.py b/src/apscheduler/_enums.py
index d8e706d..0125f2a 100644
--- a/src/apscheduler/_enums.py
+++ b/src/apscheduler/_enums.py
@@ -3,6 +3,22 @@ from __future__ import annotations
from enum import Enum, auto
+class SchedulerRole(Enum):
+ """
+ Specifies what the scheduler should be doing when it's running.
+
+ Values:
+
+ * ``scheduler``: processes due schedules, but won't run jobs
+ * ``worker``: runs due jobs, but won't process schedules
+ * ``both``: processes schedules and runs due jobs
+ """
+
+ scheduler = auto()
+ worker = auto()
+ both = auto()
+
+
class RunState(Enum):
"""
Used to track the running state of schedulers and workers.