orionis 0.519.0__py3-none-any.whl → 0.521.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_list.py +10 -9
- orionis/console/tasks/schedule.py +181 -76
- orionis/metadata/framework.py +1 -1
- {orionis-0.519.0.dist-info → orionis-0.521.0.dist-info}/METADATA +1 -1
- {orionis-0.519.0.dist-info → orionis-0.521.0.dist-info}/RECORD +9 -9
- {orionis-0.519.0.dist-info → orionis-0.521.0.dist-info}/WHEEL +0 -0
- {orionis-0.519.0.dist-info → orionis-0.521.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.519.0.dist-info → orionis-0.521.0.dist-info}/top_level.txt +0 -0
- {orionis-0.519.0.dist-info → orionis-0.521.0.dist-info}/zip-safe +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from typing import Dict, List
|
|
1
2
|
from rich.console import Console
|
|
2
3
|
from rich.panel import Panel
|
|
3
4
|
from rich.table import Table
|
|
@@ -71,7 +72,7 @@ class ScheduleListCommand(BaseCommand):
|
|
|
71
72
|
await scheduler.tasks(schedule_service)
|
|
72
73
|
|
|
73
74
|
# Retrieve the list of scheduled jobs/events
|
|
74
|
-
list_tasks = schedule_service.events()
|
|
75
|
+
list_tasks: List[Dict] = schedule_service.events()
|
|
75
76
|
|
|
76
77
|
# Display a message if no scheduled jobs are found
|
|
77
78
|
if not list_tasks:
|
|
@@ -85,20 +86,20 @@ class ScheduleListCommand(BaseCommand):
|
|
|
85
86
|
table.add_column("Signature", style="cyan", no_wrap=True)
|
|
86
87
|
table.add_column("Arguments", style="magenta")
|
|
87
88
|
table.add_column("Purpose", style="green")
|
|
88
|
-
table.add_column("Random Delay (
|
|
89
|
+
table.add_column("Random Delay (Calculated Result)", style="yellow")
|
|
89
90
|
table.add_column("Start Date", style="white")
|
|
90
91
|
table.add_column("End Date", style="white")
|
|
91
92
|
table.add_column("Details", style="dim")
|
|
92
93
|
|
|
93
94
|
# Populate the table with job details
|
|
94
95
|
for job in list_tasks:
|
|
95
|
-
signature = str(job.get("signature"
|
|
96
|
-
args =
|
|
97
|
-
purpose = str(job.get("purpose"
|
|
98
|
-
random_delay = str(job.get("random_delay"
|
|
99
|
-
start_date = str(job.get("start_date"
|
|
100
|
-
end_date = str(job.get("end_date"
|
|
101
|
-
details = str(job.get("details"
|
|
96
|
+
signature = str(job.get("signature"))
|
|
97
|
+
args = str(job.get("args", []))
|
|
98
|
+
purpose = str(job.get("purpose"))
|
|
99
|
+
random_delay = str(job.get("random_delay"))
|
|
100
|
+
start_date = str(job.get("start_date"))
|
|
101
|
+
end_date = str(job.get("end_date"))
|
|
102
|
+
details = str(job.get("details"))
|
|
102
103
|
|
|
103
104
|
table.add_row(signature, args, purpose, random_delay, start_date, end_date, details)
|
|
104
105
|
|
|
@@ -113,6 +113,10 @@ class Scheduler(ISchedule):
|
|
|
113
113
|
# Initialize the listeners dictionary to manage event listeners.
|
|
114
114
|
self.__listeners: Dict[str, callable] = {}
|
|
115
115
|
|
|
116
|
+
# Add this line to the existing __init__ method
|
|
117
|
+
self._stop_event: Optional[asyncio.Event] = None
|
|
118
|
+
|
|
119
|
+
|
|
116
120
|
def __getCurrentTime(
|
|
117
121
|
self
|
|
118
122
|
) -> str:
|
|
@@ -367,17 +371,32 @@ class Scheduler(ISchedule):
|
|
|
367
371
|
|
|
368
372
|
# Ensure the listener is callable before invoking it
|
|
369
373
|
if callable(listener):
|
|
374
|
+
|
|
370
375
|
try:
|
|
376
|
+
|
|
371
377
|
# If the listener is a coroutine, schedule it as an asyncio task
|
|
372
378
|
if asyncio.iscoroutinefunction(listener):
|
|
373
|
-
|
|
379
|
+
try:
|
|
380
|
+
# Try to get the running event loop
|
|
381
|
+
loop = asyncio.get_running_loop()
|
|
382
|
+
loop.create_task(listener(event_data, self))
|
|
383
|
+
except RuntimeError:
|
|
384
|
+
# If no event loop is running, create a new one
|
|
385
|
+
asyncio.run(listener(event_data, self))
|
|
374
386
|
# Otherwise, invoke the listener directly as a regular function
|
|
375
387
|
else:
|
|
376
388
|
listener(event_data, self)
|
|
389
|
+
|
|
377
390
|
except Exception as e:
|
|
391
|
+
|
|
378
392
|
# Log any exceptions that occur during listener invocation
|
|
379
393
|
self.__logger.error(f"Error invoking global listener for event '{scheduler_event}': {str(e)}")
|
|
380
394
|
|
|
395
|
+
# Raise a runtime error if listener invocation fails
|
|
396
|
+
raise CLIOrionisRuntimeError(
|
|
397
|
+
f"An error occurred while invoking the listener for event '{scheduler_event}': {str(e)}"
|
|
398
|
+
)
|
|
399
|
+
|
|
381
400
|
def __taskCallableListener(
|
|
382
401
|
self,
|
|
383
402
|
event_data: Optional[Union[JobError, JobExecuted, JobSubmitted, JobMissed, JobMaxInstances]],
|
|
@@ -963,9 +982,9 @@ class Scheduler(ISchedule):
|
|
|
963
982
|
"""
|
|
964
983
|
Schedule the scheduler to pause all operations at a specific datetime.
|
|
965
984
|
|
|
966
|
-
This method
|
|
967
|
-
|
|
968
|
-
|
|
985
|
+
This method schedules a job that pauses the AsyncIOScheduler at the specified datetime.
|
|
986
|
+
The job is added to the scheduler with a 'date' trigger, ensuring it executes exactly
|
|
987
|
+
at the given time. If a pause job already exists, it is replaced to avoid conflicts.
|
|
969
988
|
|
|
970
989
|
Parameters
|
|
971
990
|
----------
|
|
@@ -983,20 +1002,37 @@ class Scheduler(ISchedule):
|
|
|
983
1002
|
------
|
|
984
1003
|
ValueError
|
|
985
1004
|
If the 'at' parameter is not a valid datetime object.
|
|
1005
|
+
CLIOrionisRuntimeError
|
|
1006
|
+
If the scheduler is not running or if an error occurs during job scheduling.
|
|
986
1007
|
"""
|
|
987
1008
|
|
|
988
1009
|
# Validate that the 'at' parameter is a datetime object
|
|
989
1010
|
if not isinstance(at, datetime):
|
|
990
1011
|
raise ValueError("The 'at' parameter must be a datetime object.")
|
|
991
1012
|
|
|
992
|
-
#
|
|
993
|
-
self.__scheduler.
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1013
|
+
# Ensure the scheduler is running before scheduling a pause operation
|
|
1014
|
+
if not self.__scheduler.running:
|
|
1015
|
+
raise CLIOrionisRuntimeError("Cannot schedule pause operation: scheduler is not running.")
|
|
1016
|
+
|
|
1017
|
+
try:
|
|
1018
|
+
# Remove any existing pause job to avoid conflicts
|
|
1019
|
+
try:
|
|
1020
|
+
self.__scheduler.remove_job(ListeningEvent.SCHEDULER_PAUSED.value)
|
|
1021
|
+
except:
|
|
1022
|
+
pass # If the job doesn't exist, it's fine to proceed
|
|
1023
|
+
|
|
1024
|
+
# Add a job to the scheduler to pause it at the specified datetime
|
|
1025
|
+
self.__scheduler.add_job(
|
|
1026
|
+
func=self.__scheduler.pause, # Function to pause the scheduler
|
|
1027
|
+
trigger=DateTrigger(run_date=at), # Trigger type is 'date' for one-time execution
|
|
1028
|
+
id=ListeningEvent.SCHEDULER_PAUSED.value, # Unique job ID for pausing the scheduler
|
|
1029
|
+
name="Pause Scheduler", # Descriptive name for the job
|
|
1030
|
+
replace_existing=True # Replace any existing job with the same ID
|
|
1031
|
+
)
|
|
1032
|
+
|
|
1033
|
+
except Exception as e:
|
|
1034
|
+
# Handle exceptions that may occur during job scheduling
|
|
1035
|
+
raise CLIOrionisRuntimeError(f"Failed to schedule scheduler pause: {str(e)}") from e
|
|
1000
1036
|
|
|
1001
1037
|
def resumeEverythingAt(
|
|
1002
1038
|
self,
|
|
@@ -1005,9 +1041,9 @@ class Scheduler(ISchedule):
|
|
|
1005
1041
|
"""
|
|
1006
1042
|
Schedule the scheduler to resume all operations at a specific datetime.
|
|
1007
1043
|
|
|
1008
|
-
This method
|
|
1009
|
-
|
|
1010
|
-
|
|
1044
|
+
This method schedules a job that resumes the AsyncIOScheduler at the specified datetime.
|
|
1045
|
+
The job is added to the scheduler with a 'date' trigger, ensuring it executes exactly
|
|
1046
|
+
at the given time. If a resume job already exists, it is replaced to avoid conflicts.
|
|
1011
1047
|
|
|
1012
1048
|
Parameters
|
|
1013
1049
|
----------
|
|
@@ -1025,20 +1061,37 @@ class Scheduler(ISchedule):
|
|
|
1025
1061
|
------
|
|
1026
1062
|
ValueError
|
|
1027
1063
|
If the 'at' parameter is not a valid datetime object.
|
|
1064
|
+
CLIOrionisRuntimeError
|
|
1065
|
+
If the scheduler is not running or if an error occurs during job scheduling.
|
|
1028
1066
|
"""
|
|
1029
1067
|
|
|
1030
1068
|
# Validate that the 'at' parameter is a datetime object
|
|
1031
1069
|
if not isinstance(at, datetime):
|
|
1032
1070
|
raise ValueError("The 'at' parameter must be a datetime object.")
|
|
1033
1071
|
|
|
1034
|
-
#
|
|
1035
|
-
self.__scheduler.
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1072
|
+
# Ensure the scheduler is running before scheduling a resume operation
|
|
1073
|
+
if not self.__scheduler.running:
|
|
1074
|
+
raise CLIOrionisRuntimeError("Cannot schedule resume operation: scheduler is not running.")
|
|
1075
|
+
|
|
1076
|
+
try:
|
|
1077
|
+
# Remove any existing resume job to avoid conflicts
|
|
1078
|
+
try:
|
|
1079
|
+
self.__scheduler.remove_job(ListeningEvent.SCHEDULER_RESUMED.value)
|
|
1080
|
+
except:
|
|
1081
|
+
pass # If the job doesn't exist, it's fine to proceed
|
|
1082
|
+
|
|
1083
|
+
# Add a job to the scheduler to resume it at the specified datetime
|
|
1084
|
+
self.__scheduler.add_job(
|
|
1085
|
+
func=self.__scheduler.resume, # Function to resume the scheduler
|
|
1086
|
+
trigger=DateTrigger(run_date=at), # Trigger type is 'date' for one-time execution
|
|
1087
|
+
id=ListeningEvent.SCHEDULER_RESUMED.value, # Unique job ID for resuming the scheduler
|
|
1088
|
+
name="Resume Scheduler", # Descriptive name for the job
|
|
1089
|
+
replace_existing=True # Replace any existing job with the same ID
|
|
1090
|
+
)
|
|
1091
|
+
|
|
1092
|
+
except Exception as e:
|
|
1093
|
+
# Handle exceptions that may occur during job scheduling
|
|
1094
|
+
raise CLIOrionisRuntimeError(f"Failed to schedule scheduler resume: {str(e)}") from e
|
|
1042
1095
|
|
|
1043
1096
|
def shutdownEverythingAt(
|
|
1044
1097
|
self,
|
|
@@ -1047,9 +1100,9 @@ class Scheduler(ISchedule):
|
|
|
1047
1100
|
"""
|
|
1048
1101
|
Schedule the scheduler to shut down all operations at a specific datetime.
|
|
1049
1102
|
|
|
1050
|
-
This method
|
|
1051
|
-
|
|
1052
|
-
|
|
1103
|
+
This method schedules a job that shuts down the AsyncIOScheduler at the specified datetime.
|
|
1104
|
+
The job is added to the scheduler with a 'date' trigger, ensuring it executes exactly
|
|
1105
|
+
at the given time. If a shutdown job already exists, it is replaced to avoid conflicts.
|
|
1053
1106
|
|
|
1054
1107
|
Parameters
|
|
1055
1108
|
----------
|
|
@@ -1067,87 +1120,123 @@ class Scheduler(ISchedule):
|
|
|
1067
1120
|
------
|
|
1068
1121
|
ValueError
|
|
1069
1122
|
If the 'at' parameter is not a valid datetime object.
|
|
1123
|
+
CLIOrionisRuntimeError
|
|
1124
|
+
If the scheduler is not running or if an error occurs during job scheduling.
|
|
1070
1125
|
"""
|
|
1071
1126
|
|
|
1072
1127
|
# Validate that the 'at' parameter is a datetime object
|
|
1073
1128
|
if not isinstance(at, datetime):
|
|
1074
1129
|
raise ValueError("The 'at' parameter must be a datetime object.")
|
|
1075
1130
|
|
|
1076
|
-
#
|
|
1077
|
-
self.__scheduler.
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1131
|
+
# Ensure the scheduler is running before scheduling a shutdown operation
|
|
1132
|
+
if not self.__scheduler.running:
|
|
1133
|
+
raise CLIOrionisRuntimeError("Cannot schedule shutdown operation: scheduler is not running.")
|
|
1134
|
+
|
|
1135
|
+
try:
|
|
1136
|
+
# Remove any existing shutdown job to avoid conflicts
|
|
1137
|
+
try:
|
|
1138
|
+
self.__scheduler.remove_job(ListeningEvent.SCHEDULER_SHUTDOWN.value)
|
|
1139
|
+
except:
|
|
1140
|
+
pass # If the job doesn't exist, it's fine to proceed
|
|
1141
|
+
|
|
1142
|
+
# Add a job to the scheduler to shut it down at the specified datetime
|
|
1143
|
+
self.__scheduler.add_job(
|
|
1144
|
+
func=self.__scheduler.shutdown, # Function to shut down the scheduler
|
|
1145
|
+
trigger=DateTrigger(run_date=at), # Trigger type is 'date' for one-time execution
|
|
1146
|
+
id=ListeningEvent.SCHEDULER_SHUTDOWN.value, # Unique job ID for shutting down the scheduler
|
|
1147
|
+
name="Shutdown Scheduler", # Descriptive name for the job
|
|
1148
|
+
replace_existing=True # Replace any existing job with the same ID
|
|
1149
|
+
)
|
|
1150
|
+
|
|
1151
|
+
except Exception as e:
|
|
1152
|
+
# Handle exceptions that may occur during job scheduling
|
|
1153
|
+
raise CLIOrionisRuntimeError(f"Failed to schedule scheduler shutdown: {str(e)}") from e
|
|
1084
1154
|
|
|
1085
1155
|
async def start(self) -> None:
|
|
1086
1156
|
"""
|
|
1087
1157
|
Start the AsyncIO scheduler instance and keep it running.
|
|
1088
1158
|
|
|
1089
|
-
This method
|
|
1090
|
-
|
|
1091
|
-
|
|
1159
|
+
This method initializes and starts the AsyncIOScheduler, which integrates with the asyncio event loop
|
|
1160
|
+
to manage asynchronous job execution. It ensures that all scheduled events are loaded, listeners are
|
|
1161
|
+
subscribed, and the scheduler is started within an asyncio context. The method keeps the scheduler
|
|
1162
|
+
running until a stop signal is received, handling graceful shutdowns and interruptions.
|
|
1092
1163
|
|
|
1093
1164
|
Returns
|
|
1094
1165
|
-------
|
|
1095
1166
|
None
|
|
1096
|
-
This method does not return any value. It starts the AsyncIO scheduler
|
|
1097
|
-
|
|
1167
|
+
This method does not return any value. It starts the AsyncIO scheduler, keeps it running, and
|
|
1168
|
+
ensures proper cleanup during shutdown.
|
|
1098
1169
|
|
|
1099
|
-
|
|
1170
|
+
Raises
|
|
1171
|
+
------
|
|
1172
|
+
CLIOrionisRuntimeError
|
|
1173
|
+
If the scheduler fails to start due to missing an asyncio event loop or other runtime issues.
|
|
1174
|
+
"""
|
|
1100
1175
|
try:
|
|
1176
|
+
# Ensure the method is called within an asyncio event loop
|
|
1177
|
+
loop = asyncio.get_running_loop()
|
|
1178
|
+
|
|
1179
|
+
# Create an asyncio event to manage clean shutdowns
|
|
1180
|
+
self._stop_event = asyncio.Event()
|
|
1101
1181
|
|
|
1102
|
-
#
|
|
1182
|
+
# Load all scheduled events into the internal jobs list
|
|
1103
1183
|
self.__loadEvents()
|
|
1104
1184
|
|
|
1105
1185
|
# Subscribe to scheduler events for monitoring and handling
|
|
1106
1186
|
self.__subscribeListeners()
|
|
1107
1187
|
|
|
1108
|
-
#
|
|
1109
|
-
asyncio.get_running_loop()
|
|
1110
|
-
|
|
1111
|
-
# Start the scheduler
|
|
1188
|
+
# Start the scheduler if it is not already running
|
|
1112
1189
|
if not self.__scheduler.running:
|
|
1113
1190
|
self.__scheduler.start()
|
|
1114
1191
|
|
|
1115
|
-
#
|
|
1116
|
-
|
|
1192
|
+
# Log that the scheduler is now active and waiting for events
|
|
1193
|
+
self.__logger.info("Scheduler is now active and waiting for events...")
|
|
1117
1194
|
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1195
|
+
try:
|
|
1196
|
+
# Wait for the stop event to be set, which signals a shutdown
|
|
1197
|
+
# This avoids using a busy loop and is more efficient
|
|
1198
|
+
await self._stop_event.wait()
|
|
1121
1199
|
|
|
1122
1200
|
except (KeyboardInterrupt, asyncio.CancelledError):
|
|
1123
|
-
|
|
1201
|
+
# Handle graceful shutdown when an interruption signal is received
|
|
1202
|
+
self.__logger.info("Received shutdown signal, stopping scheduler...")
|
|
1203
|
+
await self.shutdown(wait=True)
|
|
1204
|
+
|
|
1124
1205
|
except Exception as e:
|
|
1125
|
-
raise
|
|
1206
|
+
# Log and raise any unexpected exceptions during scheduler operation
|
|
1207
|
+
self.__logger.error(f"Error during scheduler operation: {str(e)}")
|
|
1208
|
+
raise CLIOrionisRuntimeError(f"Scheduler operation failed: {str(e)}") from e
|
|
1126
1209
|
|
|
1210
|
+
finally:
|
|
1211
|
+
# Ensure the scheduler is shut down properly, even if an error occurs
|
|
1212
|
+
if self.__scheduler.running:
|
|
1213
|
+
await self.shutdown(wait=False)
|
|
1127
1214
|
|
|
1128
|
-
except
|
|
1215
|
+
except RuntimeError as e:
|
|
1216
|
+
# Handle the case where no asyncio event loop is running
|
|
1217
|
+
if "no running event loop" in str(e):
|
|
1218
|
+
raise CLIOrionisRuntimeError("Scheduler must be started within an asyncio event loop") from e
|
|
1219
|
+
raise CLIOrionisRuntimeError(f"Failed to start the scheduler: {str(e)}") from e
|
|
1129
1220
|
|
|
1130
|
-
|
|
1131
|
-
|
|
1221
|
+
except Exception as e:
|
|
1222
|
+
# Raise a runtime error for any other issues during startup
|
|
1223
|
+
raise CLIOrionisRuntimeError(f"Failed to start the scheduler: {str(e)}") from e
|
|
1132
1224
|
|
|
1133
|
-
async def shutdown(self, wait=True) -> None:
|
|
1225
|
+
async def shutdown(self, wait: bool = True) -> None:
|
|
1134
1226
|
"""
|
|
1135
1227
|
Shut down the AsyncIO scheduler instance asynchronously.
|
|
1136
1228
|
|
|
1137
|
-
This method gracefully stops the AsyncIOScheduler
|
|
1138
|
-
|
|
1139
|
-
to complete currently executing jobs before shutting down.
|
|
1229
|
+
This method gracefully stops the AsyncIOScheduler and signals the main event loop
|
|
1230
|
+
to stop waiting, allowing for clean application shutdown.
|
|
1140
1231
|
|
|
1141
1232
|
Parameters
|
|
1142
1233
|
----------
|
|
1143
1234
|
wait : bool, optional
|
|
1144
|
-
If True,
|
|
1145
|
-
If False, the scheduler shuts down immediately without waiting for running jobs to finish. Default is True.
|
|
1235
|
+
If True, waits for currently executing jobs to complete. Default is True.
|
|
1146
1236
|
|
|
1147
1237
|
Returns
|
|
1148
1238
|
-------
|
|
1149
1239
|
None
|
|
1150
|
-
This method does not return any value. It performs the shutdown operation for the AsyncIO scheduler.
|
|
1151
1240
|
|
|
1152
1241
|
Raises
|
|
1153
1242
|
------
|
|
@@ -1157,25 +1246,32 @@ class Scheduler(ISchedule):
|
|
|
1157
1246
|
If an error occurs during the shutdown process.
|
|
1158
1247
|
"""
|
|
1159
1248
|
|
|
1160
|
-
#
|
|
1249
|
+
# Validate the wait parameter
|
|
1161
1250
|
if not isinstance(wait, bool):
|
|
1162
1251
|
raise ValueError("The 'wait' parameter must be a boolean value.")
|
|
1163
1252
|
|
|
1164
|
-
# If the scheduler is not running, there
|
|
1253
|
+
# If the scheduler is not running, there's nothing to shut down
|
|
1165
1254
|
if not self.__scheduler.running:
|
|
1166
1255
|
return
|
|
1167
1256
|
|
|
1168
1257
|
try:
|
|
1169
|
-
#
|
|
1258
|
+
# Log the shutdown process
|
|
1259
|
+
self.__logger.info(f"Shutting down scheduler (wait={wait})...")
|
|
1260
|
+
|
|
1261
|
+
# Shut down the AsyncIOScheduler
|
|
1170
1262
|
self.__scheduler.shutdown(wait=wait)
|
|
1171
1263
|
|
|
1172
|
-
#
|
|
1264
|
+
# Signal the stop event to break the wait in start()
|
|
1265
|
+
if self._stop_event and not self._stop_event.is_set():
|
|
1266
|
+
self._stop_event.set()
|
|
1267
|
+
|
|
1268
|
+
# Allow time for cleanup if waiting
|
|
1173
1269
|
if wait:
|
|
1174
|
-
await asyncio.sleep(0)
|
|
1270
|
+
await asyncio.sleep(0.1)
|
|
1175
1271
|
|
|
1176
|
-
|
|
1272
|
+
self.__logger.info("Scheduler shutdown completed successfully.")
|
|
1177
1273
|
|
|
1178
|
-
|
|
1274
|
+
except Exception as e:
|
|
1179
1275
|
raise CLIOrionisRuntimeError(f"Failed to shut down the scheduler: {str(e)}") from e
|
|
1180
1276
|
|
|
1181
1277
|
def pause(self, signature: str) -> bool:
|
|
@@ -1352,15 +1448,24 @@ class Scheduler(ISchedule):
|
|
|
1352
1448
|
|
|
1353
1449
|
# Iterate over each job in the internal jobs list
|
|
1354
1450
|
for job in self.__jobs:
|
|
1451
|
+
|
|
1452
|
+
signature = job.signature
|
|
1453
|
+
args = job.args
|
|
1454
|
+
purpose = job.purpose
|
|
1455
|
+
random_delay = job.random_delay if job.random_delay else 0
|
|
1456
|
+
start_date = job.start_date.strftime('%Y-%m-%d %H:%M:%S') if job.start_date else 'Not Applicable'
|
|
1457
|
+
end_date = job.end_date.strftime('%Y-%m-%d %H:%M:%S') if job.end_date else 'Not Applicable'
|
|
1458
|
+
details = job.details if job.details else 'Not Available'
|
|
1459
|
+
|
|
1355
1460
|
# Append a dictionary with relevant job details to the events list
|
|
1356
1461
|
events.append({
|
|
1357
|
-
'signature':
|
|
1358
|
-
'args':
|
|
1359
|
-
'purpose':
|
|
1360
|
-
'random_delay':
|
|
1361
|
-
'start_date':
|
|
1362
|
-
'end_date':
|
|
1363
|
-
'details':
|
|
1462
|
+
'signature': signature,
|
|
1463
|
+
'args': args,
|
|
1464
|
+
'purpose': purpose,
|
|
1465
|
+
'random_delay': random_delay,
|
|
1466
|
+
'start_date': start_date,
|
|
1467
|
+
'end_date': end_date,
|
|
1468
|
+
'details': details
|
|
1364
1469
|
})
|
|
1365
1470
|
|
|
1366
1471
|
# Return the list of scheduled job details
|
orionis/metadata/framework.py
CHANGED
|
@@ -14,7 +14,7 @@ orionis/console/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
14
14
|
orionis/console/commands/cache.py,sha256=8DsYoRzSBLn0P9qkGVItRbo0R6snWBDBg0_Xa7tmVhs,2322
|
|
15
15
|
orionis/console/commands/help.py,sha256=zfSw0pYaOnFN-_Ozdn4veBQDYMgSSDY10nPDCi-7tTY,3199
|
|
16
16
|
orionis/console/commands/publisher.py,sha256=FUg-EUzK7LLXsla10ZUZro8V0Z5S-KjmsaSdRHSSGbA,21381
|
|
17
|
-
orionis/console/commands/scheduler_list.py,sha256=
|
|
17
|
+
orionis/console/commands/scheduler_list.py,sha256=A2N_mEXEJDHO8DX2TDrL1ROeeRhFSkWD3rCw64Hrf0o,4763
|
|
18
18
|
orionis/console/commands/scheduler_work.py,sha256=yHTbnDH1frAmyvPaUgn0a5q34Eym9QYMXdqYZWwodFs,6336
|
|
19
19
|
orionis/console/commands/test.py,sha256=-EmQwFwMBuby3OI9HwqMIwuJzd2CGbWbOqmwrR25sOE,2402
|
|
20
20
|
orionis/console/commands/version.py,sha256=SUuNDJ40f2uq69OQUmPQXJKaa9Bm_iVRDPmBd7zc1Yc,3658
|
|
@@ -81,7 +81,7 @@ orionis/console/request/cli_request.py,sha256=7-sgYmNUCipuHLVAwWLJiHv0cJCDmsM1Lu
|
|
|
81
81
|
orionis/console/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
82
82
|
orionis/console/tasks/event.py,sha256=l4J-HEPaj1mxB_PYQMgG9dRHUe01wUag8fKLLnR2N2M,164395
|
|
83
83
|
orionis/console/tasks/listener.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
84
|
-
orionis/console/tasks/schedule.py,sha256=
|
|
84
|
+
orionis/console/tasks/schedule.py,sha256=iHy6ihs1DkpMccmQbxsgjLh0VolIEIBUCOd2SjDk7Mg,62529
|
|
85
85
|
orionis/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
86
86
|
orionis/container/container.py,sha256=aF_b6lTUpG4YCo9yFJEzsntTdIzgMMXFW5LyWqAJVBQ,87987
|
|
87
87
|
orionis/container/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -239,7 +239,7 @@ orionis/foundation/providers/scheduler_provider.py,sha256=72SoixFog9IOE9Ve9Xcfw6
|
|
|
239
239
|
orionis/foundation/providers/testing_provider.py,sha256=SrJRpdvcblx9WvX7x9Y3zc7OQfiTf7la0HAJrm2ESlE,3725
|
|
240
240
|
orionis/foundation/providers/workers_provider.py,sha256=oa_2NIDH6UxZrtuGkkoo_zEoNIMGgJ46vg5CCgAm7wI,3926
|
|
241
241
|
orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
242
|
-
orionis/metadata/framework.py,sha256
|
|
242
|
+
orionis/metadata/framework.py,sha256=-_fa2tqmC78B94qGtYCVfj_9ftofE2F8dwev3UI20JM,4109
|
|
243
243
|
orionis/metadata/package.py,sha256=k7Yriyp5aUcR-iR8SK2ec_lf0_Cyc-C7JczgXa-I67w,16039
|
|
244
244
|
orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
245
245
|
orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -415,7 +415,7 @@ orionis/test/validators/web_report.py,sha256=n9BfzOZz6aEiNTypXcwuWbFRG0OdHNSmCNu
|
|
|
415
415
|
orionis/test/validators/workers.py,sha256=rWcdRexINNEmGaO7mnc1MKUxkHKxrTsVuHgbnIfJYgc,1206
|
|
416
416
|
orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
417
417
|
orionis/test/view/render.py,sha256=f-zNhtKSg9R5Njqujbg2l2amAs2-mRVESneLIkWOZjU,4082
|
|
418
|
-
orionis-0.
|
|
418
|
+
orionis-0.521.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
|
|
419
419
|
tests/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
420
420
|
tests/container/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
421
421
|
tests/container/context/test_manager.py,sha256=wOwXpl9rHNfTTexa9GBKYMwK0_-KSQPbI-AEyGNkmAE,1356
|
|
@@ -561,8 +561,8 @@ tests/testing/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
561
561
|
tests/testing/validators/test_testing_validators.py,sha256=WPo5GxTP6xE-Dw3X1vZoqOMpb6HhokjNSbgDsDRDvy4,16588
|
|
562
562
|
tests/testing/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
563
563
|
tests/testing/view/test_render.py,sha256=tnnMBwS0iKUIbogLvu-7Rii50G6Koddp3XT4wgdFEYM,1050
|
|
564
|
-
orionis-0.
|
|
565
|
-
orionis-0.
|
|
566
|
-
orionis-0.
|
|
567
|
-
orionis-0.
|
|
568
|
-
orionis-0.
|
|
564
|
+
orionis-0.521.0.dist-info/METADATA,sha256=dOEGgxOl4Q3GpYNTAAZEuCrr-Hs3zhoX7oIE-b2d3QA,4801
|
|
565
|
+
orionis-0.521.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
566
|
+
orionis-0.521.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
|
567
|
+
orionis-0.521.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
568
|
+
orionis-0.521.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|