orionis 0.521.0__py3-none-any.whl → 0.523.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- orionis/console/commands/scheduler_work.py +12 -10
- orionis/console/tasks/schedule.py +500 -125
- orionis/foundation/application.py +66 -12
- orionis/foundation/config/session/entities/session.py +2 -0
- orionis/metadata/framework.py +1 -1
- orionis/services/introspection/dataclass/__init__.py +0 -0
- orionis/services/introspection/dataclass/attributes.py +30 -0
- {orionis-0.521.0.dist-info → orionis-0.523.0.dist-info}/METADATA +1 -1
- {orionis-0.521.0.dist-info → orionis-0.523.0.dist-info}/RECORD +13 -11
- {orionis-0.521.0.dist-info → orionis-0.523.0.dist-info}/WHEEL +0 -0
- {orionis-0.521.0.dist-info → orionis-0.523.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.521.0.dist-info → orionis-0.523.0.dist-info}/top_level.txt +0 -0
- {orionis-0.521.0.dist-info → orionis-0.523.0.dist-info}/zip-safe +0 -0
|
@@ -110,21 +110,23 @@ class ScheduleWorkCommand(BaseCommand):
|
|
|
110
110
|
if hasattr(scheduler, "onError") and callable(scheduler.onError):
|
|
111
111
|
schedule_service.setListener(ListeningEvent.SCHEDULER_ERROR, scheduler.onError)
|
|
112
112
|
|
|
113
|
-
#
|
|
114
|
-
if hasattr(scheduler, "
|
|
115
|
-
if not isinstance(scheduler.
|
|
116
|
-
raise CLIOrionisRuntimeError("
|
|
117
|
-
schedule_service.
|
|
113
|
+
# If the scheduler has FINALIZE_AT and it is not None
|
|
114
|
+
if hasattr(scheduler, "FINALIZE_AT") and scheduler.FINALIZE_AT is not None:
|
|
115
|
+
if not isinstance(scheduler.FINALIZE_AT, datetime):
|
|
116
|
+
raise CLIOrionisRuntimeError("FINALIZE_AT must be a datetime instance.")
|
|
117
|
+
schedule_service.shutdownEverythingAt(scheduler.FINALIZE_AT)
|
|
118
118
|
|
|
119
|
+
# If the scheduler has RESUME_AT and it is not None
|
|
119
120
|
if hasattr(scheduler, "RESUME_AT") and scheduler.RESUME_AT is not None:
|
|
120
121
|
if not isinstance(scheduler.RESUME_AT, datetime):
|
|
121
122
|
raise CLIOrionisRuntimeError("RESUME_AT must be a datetime instance.")
|
|
122
123
|
schedule_service.resumeEverythingAt(scheduler.RESUME_AT)
|
|
123
124
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
# If the scheduler has PAUSE_AT and it is not None
|
|
126
|
+
if hasattr(scheduler, "PAUSE_AT") and scheduler.PAUSE_AT is not None:
|
|
127
|
+
if not isinstance(scheduler.PAUSE_AT, datetime):
|
|
128
|
+
raise CLIOrionisRuntimeError("PAUSE_AT must be a datetime instance.")
|
|
129
|
+
schedule_service.pauseEverythingAt(scheduler.PAUSE_AT)
|
|
128
130
|
|
|
129
131
|
# Start the scheduler worker asynchronously
|
|
130
132
|
await schedule_service.start()
|
|
@@ -137,4 +139,4 @@ class ScheduleWorkCommand(BaseCommand):
|
|
|
137
139
|
# Raise any unexpected exceptions as CLIOrionisRuntimeError
|
|
138
140
|
raise CLIOrionisRuntimeError(
|
|
139
141
|
f"An unexpected error occurred while starting the scheduler worker: {e}"
|
|
140
|
-
)
|
|
142
|
+
)
|