orionis 0.537.0__py3-none-any.whl → 0.538.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/contracts/schedule.py +106 -3
- orionis/console/tasks/schedule.py +83 -61
- orionis/metadata/framework.py +1 -1
- {orionis-0.537.0.dist-info → orionis-0.538.0.dist-info}/METADATA +1 -1
- {orionis-0.537.0.dist-info → orionis-0.538.0.dist-info}/RECORD +9 -9
- {orionis-0.537.0.dist-info → orionis-0.538.0.dist-info}/WHEEL +0 -0
- {orionis-0.537.0.dist-info → orionis-0.538.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.537.0.dist-info → orionis-0.538.0.dist-info}/top_level.txt +0 -0
- {orionis-0.537.0.dist-info → orionis-0.538.0.dist-info}/zip-safe +0 -0
|
@@ -218,7 +218,7 @@ class ISchedule(ABC):
|
|
|
218
218
|
pass
|
|
219
219
|
|
|
220
220
|
@abstractmethod
|
|
221
|
-
def
|
|
221
|
+
def pauseTask(self, signature: str) -> bool:
|
|
222
222
|
"""
|
|
223
223
|
Pause a scheduled job in the AsyncIO scheduler.
|
|
224
224
|
|
|
@@ -246,7 +246,7 @@ class ISchedule(ABC):
|
|
|
246
246
|
pass
|
|
247
247
|
|
|
248
248
|
@abstractmethod
|
|
249
|
-
def
|
|
249
|
+
def resumeTask(self, signature: str) -> bool:
|
|
250
250
|
"""
|
|
251
251
|
Resume a paused job in the AsyncIO scheduler.
|
|
252
252
|
|
|
@@ -274,7 +274,7 @@ class ISchedule(ABC):
|
|
|
274
274
|
pass
|
|
275
275
|
|
|
276
276
|
@abstractmethod
|
|
277
|
-
def
|
|
277
|
+
def removeTask(self, signature: str) -> bool:
|
|
278
278
|
"""
|
|
279
279
|
Remove a scheduled job from the AsyncIO scheduler.
|
|
280
280
|
|
|
@@ -324,4 +324,107 @@ class ISchedule(ABC):
|
|
|
324
324
|
- 'end_date': str or None, the formatted end date and time of the job, or None if not set.
|
|
325
325
|
- 'details': any, additional details about the job.
|
|
326
326
|
"""
|
|
327
|
+
pass
|
|
328
|
+
|
|
329
|
+
@abstractmethod
|
|
330
|
+
def cancelScheduledPause(self) -> bool:
|
|
331
|
+
"""
|
|
332
|
+
Cancel a previously scheduled pause operation.
|
|
333
|
+
|
|
334
|
+
This method attempts to remove a job from the scheduler that was set to pause
|
|
335
|
+
the scheduler at a specific time. If the job exists, it is removed, and a log entry
|
|
336
|
+
is created to indicate the cancellation. If no such job exists, the method returns False.
|
|
337
|
+
|
|
338
|
+
Returns
|
|
339
|
+
-------
|
|
340
|
+
bool
|
|
341
|
+
True if the scheduled pause job was successfully cancelled.
|
|
342
|
+
False if no pause job was found or an error occurred during the cancellation process.
|
|
343
|
+
"""
|
|
344
|
+
pass
|
|
345
|
+
|
|
346
|
+
@abstractmethod
|
|
347
|
+
def cancelScheduledResume(self) -> bool:
|
|
348
|
+
"""
|
|
349
|
+
Cancel a previously scheduled resume operation.
|
|
350
|
+
|
|
351
|
+
This method attempts to remove a job from the scheduler that was set to resume
|
|
352
|
+
the scheduler at a specific time. If the job exists, it is removed, and a log entry
|
|
353
|
+
is created to indicate the cancellation. If no such job exists, the method returns False.
|
|
354
|
+
|
|
355
|
+
Returns
|
|
356
|
+
-------
|
|
357
|
+
bool
|
|
358
|
+
True if the scheduled resume job was successfully cancelled.
|
|
359
|
+
False if no resume job was found or an error occurred during the cancellation process.
|
|
360
|
+
"""
|
|
361
|
+
pass
|
|
362
|
+
|
|
363
|
+
@abstractmethod
|
|
364
|
+
def cancelScheduledShutdown(self) -> bool:
|
|
365
|
+
"""
|
|
366
|
+
Cancel a previously scheduled shutdown operation.
|
|
367
|
+
|
|
368
|
+
This method attempts to remove a job from the scheduler that was set to shut down
|
|
369
|
+
the scheduler at a specific time. If the job exists, it is removed, and a log entry
|
|
370
|
+
is created to indicate the cancellation. If no such job exists, the method returns False.
|
|
371
|
+
|
|
372
|
+
Returns
|
|
373
|
+
-------
|
|
374
|
+
bool
|
|
375
|
+
True if the scheduled shutdown job was successfully cancelled.
|
|
376
|
+
False if no shutdown job was found or an error occurred during the cancellation process.
|
|
377
|
+
"""
|
|
378
|
+
pass
|
|
379
|
+
|
|
380
|
+
@abstractmethod
|
|
381
|
+
def isRunning(self) -> bool:
|
|
382
|
+
"""
|
|
383
|
+
Determine if the scheduler is currently active and running.
|
|
384
|
+
|
|
385
|
+
This method checks the internal state of the AsyncIOScheduler instance to determine
|
|
386
|
+
whether it is currently running. The scheduler is considered running if it has been
|
|
387
|
+
started and has not been paused or shut down.
|
|
388
|
+
|
|
389
|
+
Returns
|
|
390
|
+
-------
|
|
391
|
+
bool
|
|
392
|
+
True if the scheduler is running, False otherwise.
|
|
393
|
+
"""
|
|
394
|
+
pass
|
|
395
|
+
|
|
396
|
+
@abstractmethod
|
|
397
|
+
def forceStop(self) -> None:
|
|
398
|
+
"""
|
|
399
|
+
Forcefully stop the scheduler immediately without waiting for jobs to complete.
|
|
400
|
+
|
|
401
|
+
This method shuts down the AsyncIOScheduler instance without waiting for currently
|
|
402
|
+
running jobs to finish. It is intended for emergency situations where an immediate
|
|
403
|
+
stop is required. The method also signals the internal stop event to ensure that
|
|
404
|
+
the scheduler's main loop is interrupted and the application can proceed with
|
|
405
|
+
shutdown procedures.
|
|
406
|
+
|
|
407
|
+
Returns
|
|
408
|
+
-------
|
|
409
|
+
None
|
|
410
|
+
This method does not return any value. It forcefully stops the scheduler and
|
|
411
|
+
signals the stop event.
|
|
412
|
+
"""
|
|
413
|
+
pass
|
|
414
|
+
|
|
415
|
+
@abstractmethod
|
|
416
|
+
def stop(self) -> None:
|
|
417
|
+
"""
|
|
418
|
+
Stop the scheduler synchronously by setting the stop event.
|
|
419
|
+
|
|
420
|
+
This method signals the scheduler to stop by setting the internal stop event.
|
|
421
|
+
It can be called from non-async contexts to initiate a shutdown. If the asyncio
|
|
422
|
+
event loop is running, the stop event is set in a thread-safe manner. Otherwise,
|
|
423
|
+
the stop event is set directly.
|
|
424
|
+
|
|
425
|
+
Returns
|
|
426
|
+
-------
|
|
427
|
+
None
|
|
428
|
+
This method does not return any value. It signals the scheduler to stop.
|
|
429
|
+
"""
|
|
327
430
|
pass
|
|
@@ -37,7 +37,6 @@ from orionis.console.exceptions import CLIOrionisRuntimeError
|
|
|
37
37
|
from orionis.console.exceptions.cli_orionis_value_error import CLIOrionisValueError
|
|
38
38
|
from orionis.failure.contracts.catch import ICatch
|
|
39
39
|
from orionis.foundation.contracts.application import IApplication
|
|
40
|
-
from orionis.services.asynchrony.coroutines import Coroutine
|
|
41
40
|
from orionis.services.log.contracts.log_service import ILogger
|
|
42
41
|
|
|
43
42
|
class Schedule(ISchedule):
|
|
@@ -167,7 +166,7 @@ class Schedule(ISchedule):
|
|
|
167
166
|
# Store each job's signature and description in the commands dictionary
|
|
168
167
|
commands[job['signature']] = {
|
|
169
168
|
'signature': job['signature'],
|
|
170
|
-
'description': job.get('description', '')
|
|
169
|
+
'description': job.get('description', 'No description available.')
|
|
171
170
|
}
|
|
172
171
|
|
|
173
172
|
# Return the commands dictionary
|
|
@@ -268,7 +267,7 @@ class Schedule(ISchedule):
|
|
|
268
267
|
|
|
269
268
|
# Prevent adding new commands while the scheduler is running
|
|
270
269
|
if self.isRunning():
|
|
271
|
-
|
|
270
|
+
self.__raiseException(CLIOrionisValueError("Cannot add new commands while the scheduler is running."))
|
|
272
271
|
|
|
273
272
|
# Validate that the command signature is a non-empty string
|
|
274
273
|
if not isinstance(signature, str) or not signature.strip():
|
|
@@ -465,7 +464,7 @@ class Schedule(ISchedule):
|
|
|
465
464
|
|
|
466
465
|
# Validate that the provided event is an instance of ListeningEvent
|
|
467
466
|
if not isinstance(listening_vent, ListeningEvent):
|
|
468
|
-
|
|
467
|
+
self.__raiseException(CLIOrionisValueError("The event must be an instance of ListeningEvent."))
|
|
469
468
|
|
|
470
469
|
# Retrieve the global identifier for the event from the ListeningEvent enum
|
|
471
470
|
scheduler_event = listening_vent.value
|
|
@@ -481,16 +480,9 @@ class Schedule(ISchedule):
|
|
|
481
480
|
|
|
482
481
|
# Invoke the listener, handling both coroutine and regular functions
|
|
483
482
|
try:
|
|
484
|
-
|
|
485
|
-
# Execute coroutine listeners using container's invoke method
|
|
486
483
|
self.__app.invoke(listener, event_data, self)
|
|
487
|
-
|
|
488
484
|
except BaseException as e:
|
|
489
|
-
|
|
490
|
-
# Construct and log error message
|
|
491
|
-
error_msg = f"An error occurred while invoking the listener for event '{scheduler_event}': {str(e)}"
|
|
492
|
-
self.__logger.error(error_msg)
|
|
493
|
-
raise CLIOrionisRuntimeError(error_msg) from e
|
|
485
|
+
self.__raiseException(e)
|
|
494
486
|
|
|
495
487
|
def __taskCallableListener(
|
|
496
488
|
self,
|
|
@@ -528,9 +520,7 @@ class Schedule(ISchedule):
|
|
|
528
520
|
|
|
529
521
|
# Validate that the provided event is an instance of ListeningEvent
|
|
530
522
|
if not isinstance(listening_vent, ListeningEvent):
|
|
531
|
-
|
|
532
|
-
self.__logger.error(error_msg)
|
|
533
|
-
raise CLIOrionisValueError(error_msg)
|
|
523
|
+
self.__raiseException(CLIOrionisValueError("The event must be an instance of ListeningEvent."))
|
|
534
524
|
|
|
535
525
|
# Validate that event_data is not None and has a id attribute
|
|
536
526
|
if not isinstance(event_data, EventJob) or not hasattr(event_data, 'id') or not event_data.id:
|
|
@@ -548,25 +538,25 @@ class Schedule(ISchedule):
|
|
|
548
538
|
# Check if the listener is an instance of IScheduleEventListener
|
|
549
539
|
if issubclass(listener, IScheduleEventListener):
|
|
550
540
|
|
|
551
|
-
|
|
552
|
-
if isinstance(listener, type):
|
|
553
|
-
listener = self.__app.make(listener)
|
|
541
|
+
try:
|
|
554
542
|
|
|
555
|
-
|
|
556
|
-
|
|
543
|
+
# Initialize the listener if it's a class
|
|
544
|
+
if isinstance(listener, type):
|
|
545
|
+
listener = self.__app.make(listener)
|
|
557
546
|
|
|
558
|
-
#
|
|
559
|
-
|
|
547
|
+
# Check if the listener has a method corresponding to the event type
|
|
548
|
+
if hasattr(listener, scheduler_event) and callable(getattr(listener, scheduler_event)):
|
|
549
|
+
self.__app.call(listener, scheduler_event, event_data, self)
|
|
560
550
|
|
|
561
|
-
|
|
551
|
+
except BaseException as e:
|
|
562
552
|
|
|
563
|
-
#
|
|
564
|
-
self.
|
|
553
|
+
# If an error occurs while invoking the listener, raise an exception
|
|
554
|
+
self.__raiseException(e)
|
|
565
555
|
|
|
566
556
|
else:
|
|
567
557
|
|
|
568
|
-
#
|
|
569
|
-
self.
|
|
558
|
+
# If the listener is not a subclass of IScheduleEventListener, raise an exception
|
|
559
|
+
self.__raiseException(CLIOrionisValueError(f"The listener for job ID '{event_data.id}' must be a subclass of IScheduleEventListener."))
|
|
570
560
|
|
|
571
561
|
def __startedListener(
|
|
572
562
|
self,
|
|
@@ -714,10 +704,7 @@ class Schedule(ISchedule):
|
|
|
714
704
|
self.__globalCallableListener(event_data, ListeningEvent.SCHEDULER_ERROR)
|
|
715
705
|
|
|
716
706
|
# Catch any exceptions that occur during command handling
|
|
717
|
-
self.
|
|
718
|
-
command=job_event_data.id,
|
|
719
|
-
args=list(job_event_data.args) or []
|
|
720
|
-
), event.exception)
|
|
707
|
+
self.__raiseException(event.exception)
|
|
721
708
|
|
|
722
709
|
def __submittedListener(
|
|
723
710
|
self,
|
|
@@ -916,7 +903,7 @@ class Schedule(ISchedule):
|
|
|
916
903
|
|
|
917
904
|
try:
|
|
918
905
|
# Convert the event to its entity representation
|
|
919
|
-
entity = event.toEntity()
|
|
906
|
+
entity: EventEntity = event.toEntity()
|
|
920
907
|
|
|
921
908
|
# Add the job to the internal jobs list
|
|
922
909
|
self.__jobs.append(entity)
|
|
@@ -954,6 +941,48 @@ class Schedule(ISchedule):
|
|
|
954
941
|
# Raise a runtime error if loading the scheduled event fails
|
|
955
942
|
raise CLIOrionisRuntimeError(error_msg)
|
|
956
943
|
|
|
944
|
+
def __raiseException(
|
|
945
|
+
self,
|
|
946
|
+
exception: BaseException
|
|
947
|
+
) -> None:
|
|
948
|
+
"""
|
|
949
|
+
Handle and propagate exceptions through the application's error handling system.
|
|
950
|
+
|
|
951
|
+
This private method serves as a centralized exception handler for the scheduler,
|
|
952
|
+
delegating exception processing to the application's error catching mechanism.
|
|
953
|
+
It ensures that all exceptions occurring within the scheduler context are
|
|
954
|
+
properly handled according to the application's error handling policies.
|
|
955
|
+
|
|
956
|
+
The method acts as a bridge between the scheduler's internal operations and
|
|
957
|
+
the application's global exception handling system, providing consistent
|
|
958
|
+
error handling behavior across the entire application.
|
|
959
|
+
|
|
960
|
+
Parameters
|
|
961
|
+
----------
|
|
962
|
+
exception : BaseException
|
|
963
|
+
The exception instance that was raised during command execution. This can be
|
|
964
|
+
any type of exception that inherits from BaseException, including system
|
|
965
|
+
exceptions, custom application exceptions, and runtime errors.
|
|
966
|
+
|
|
967
|
+
Returns
|
|
968
|
+
-------
|
|
969
|
+
None
|
|
970
|
+
This method does not return any value. It delegates exception handling
|
|
971
|
+
to the application's error catching mechanism and may re-raise the
|
|
972
|
+
exception depending on the configured error handling behavior.
|
|
973
|
+
|
|
974
|
+
Notes
|
|
975
|
+
-----
|
|
976
|
+
This method is intended for internal use within the scheduler and should not
|
|
977
|
+
be called directly by external code. The error catching mechanism may perform
|
|
978
|
+
various actions such as logging, reporting, or re-raising the exception based
|
|
979
|
+
on the application's configuration.
|
|
980
|
+
"""
|
|
981
|
+
|
|
982
|
+
# Delegate exception handling to the application's error catching mechanism
|
|
983
|
+
# This ensures consistent error handling across the entire application
|
|
984
|
+
self.__catch.exception(self, CLIRequest(command="schedule:work", args=[]), exception)
|
|
985
|
+
|
|
957
986
|
def setListener(
|
|
958
987
|
self,
|
|
959
988
|
event: Union[str, ListeningEvent],
|
|
@@ -984,7 +1013,7 @@ class Schedule(ISchedule):
|
|
|
984
1013
|
|
|
985
1014
|
Raises
|
|
986
1015
|
------
|
|
987
|
-
|
|
1016
|
+
CLIOrionisValueError
|
|
988
1017
|
If the event name is not a non-empty string or if the listener is not callable
|
|
989
1018
|
or an instance of IScheduleEventListener.
|
|
990
1019
|
"""
|
|
@@ -995,11 +1024,11 @@ class Schedule(ISchedule):
|
|
|
995
1024
|
|
|
996
1025
|
# Validate that the event name is a non-empty string
|
|
997
1026
|
if not isinstance(event, str) or not event.strip():
|
|
998
|
-
raise
|
|
1027
|
+
raise CLIOrionisValueError("Event name must be a non-empty string.")
|
|
999
1028
|
|
|
1000
1029
|
# Validate that the listener is either callable or an instance of IScheduleEventListener
|
|
1001
1030
|
if not callable(listener) and not isinstance(listener, IScheduleEventListener):
|
|
1002
|
-
raise
|
|
1031
|
+
raise CLIOrionisValueError("Listener must be a callable function or an instance of IScheduleEventListener.")
|
|
1003
1032
|
|
|
1004
1033
|
# Register the listener for the specified event in the internal listeners dictionary
|
|
1005
1034
|
self.__listeners[event] = listener
|
|
@@ -1090,19 +1119,13 @@ class Schedule(ISchedule):
|
|
|
1090
1119
|
error reporting and debugging information.
|
|
1091
1120
|
"""
|
|
1092
1121
|
|
|
1122
|
+
# Execute the asynchronous function using the container's invoke method
|
|
1093
1123
|
try:
|
|
1094
|
-
|
|
1095
|
-
# The Coroutine class handles the event loop management and async execution
|
|
1096
|
-
return Coroutine(func).invoke(*args, **kwargs)
|
|
1124
|
+
self.__app.invoke(func, *args, **kwargs)
|
|
1097
1125
|
|
|
1126
|
+
# If an error occurs during execution, raise a custom exception
|
|
1098
1127
|
except Exception as e:
|
|
1099
|
-
|
|
1100
|
-
# Log the error with detailed information for debugging purposes
|
|
1101
|
-
self.__logger.error(f"Error executing async function: {str(e)}")
|
|
1102
|
-
|
|
1103
|
-
# Re-raise the exception wrapped in a custom exception type
|
|
1104
|
-
# This provides better error context and maintains the original stack trace
|
|
1105
|
-
raise CLIOrionisRuntimeError(f"Failed to execute async function: {str(e)}") from e
|
|
1128
|
+
self.__raiseException(e)
|
|
1106
1129
|
|
|
1107
1130
|
# Return the synchronous wrapper function
|
|
1108
1131
|
return sync_wrapper
|
|
@@ -1140,7 +1163,7 @@ class Schedule(ISchedule):
|
|
|
1140
1163
|
|
|
1141
1164
|
# Validate that the 'at' parameter is a datetime object
|
|
1142
1165
|
if not isinstance(at, datetime):
|
|
1143
|
-
|
|
1166
|
+
CLIOrionisValueError("The 'at' parameter must be a datetime object.")
|
|
1144
1167
|
|
|
1145
1168
|
# Define an async function to pause the scheduler
|
|
1146
1169
|
async def schedule_pause():
|
|
@@ -1187,8 +1210,8 @@ class Schedule(ISchedule):
|
|
|
1187
1210
|
|
|
1188
1211
|
except Exception as e:
|
|
1189
1212
|
|
|
1190
|
-
#
|
|
1191
|
-
self.
|
|
1213
|
+
# If an error occurs while pausing the job, raise an exception
|
|
1214
|
+
self.__raiseException(e)
|
|
1192
1215
|
|
|
1193
1216
|
# Execute the global callable listener after all jobs are paused
|
|
1194
1217
|
self.__globalCallableListener(SchedulerPaused(
|
|
@@ -1259,7 +1282,7 @@ class Schedule(ISchedule):
|
|
|
1259
1282
|
|
|
1260
1283
|
# Validate that the 'at' parameter is a datetime object
|
|
1261
1284
|
if not isinstance(at, datetime):
|
|
1262
|
-
raise
|
|
1285
|
+
raise CLIOrionisValueError("The 'at' parameter must be a datetime object.")
|
|
1263
1286
|
|
|
1264
1287
|
# Define an async function to resume the scheduler
|
|
1265
1288
|
async def schedule_resume():
|
|
@@ -1289,8 +1312,8 @@ class Schedule(ISchedule):
|
|
|
1289
1312
|
|
|
1290
1313
|
except Exception as e:
|
|
1291
1314
|
|
|
1292
|
-
#
|
|
1293
|
-
self.
|
|
1315
|
+
# If an error occurs while resuming the job, raise an exception
|
|
1316
|
+
self.__raiseException(e)
|
|
1294
1317
|
|
|
1295
1318
|
# Clear the set after resuming all jobs
|
|
1296
1319
|
self.__pausedByPauseEverything.clear()
|
|
@@ -1396,8 +1419,7 @@ class Schedule(ISchedule):
|
|
|
1396
1419
|
except Exception as e:
|
|
1397
1420
|
|
|
1398
1421
|
# Log any errors that occur during shutdown
|
|
1399
|
-
|
|
1400
|
-
self.__logger.error(error_msg)
|
|
1422
|
+
self.__logger.error(f"Error during scheduled shutdown: {str(e)}")
|
|
1401
1423
|
|
|
1402
1424
|
# Force stop if graceful shutdown fails
|
|
1403
1425
|
self.forceStop()
|
|
@@ -1531,7 +1553,7 @@ class Schedule(ISchedule):
|
|
|
1531
1553
|
|
|
1532
1554
|
# Validate the wait parameter
|
|
1533
1555
|
if not isinstance(wait, bool):
|
|
1534
|
-
|
|
1556
|
+
self.__raiseException(CLIOrionisValueError("The 'wait' parameter must be a boolean value."))
|
|
1535
1557
|
|
|
1536
1558
|
# If the scheduler is not running, there's nothing to shut down
|
|
1537
1559
|
if not self.isRunning():
|
|
@@ -1559,9 +1581,9 @@ class Schedule(ISchedule):
|
|
|
1559
1581
|
except Exception as e:
|
|
1560
1582
|
|
|
1561
1583
|
# Handle exceptions that may occur during shutdown
|
|
1562
|
-
|
|
1584
|
+
self.__raiseException(CLIOrionisRuntimeError(f"Failed to shut down the scheduler: {str(e)}"))
|
|
1563
1585
|
|
|
1564
|
-
def
|
|
1586
|
+
def pauseTask(self, signature: str) -> bool:
|
|
1565
1587
|
"""
|
|
1566
1588
|
Pause a scheduled job in the AsyncIO scheduler.
|
|
1567
1589
|
|
|
@@ -1589,7 +1611,7 @@ class Schedule(ISchedule):
|
|
|
1589
1611
|
|
|
1590
1612
|
# Validate that the signature is a non-empty string
|
|
1591
1613
|
if not isinstance(signature, str) or not signature.strip():
|
|
1592
|
-
|
|
1614
|
+
self.__raiseException(CLIOrionisValueError("Signature must be a non-empty string."))
|
|
1593
1615
|
|
|
1594
1616
|
try:
|
|
1595
1617
|
|
|
@@ -1607,7 +1629,7 @@ class Schedule(ISchedule):
|
|
|
1607
1629
|
# Return False if the job could not be paused (e.g., it does not exist)
|
|
1608
1630
|
return False
|
|
1609
1631
|
|
|
1610
|
-
def
|
|
1632
|
+
def resumeTask(self, signature: str) -> bool:
|
|
1611
1633
|
"""
|
|
1612
1634
|
Resume a paused job in the AsyncIO scheduler.
|
|
1613
1635
|
|
|
@@ -1635,7 +1657,7 @@ class Schedule(ISchedule):
|
|
|
1635
1657
|
|
|
1636
1658
|
# Validate that the signature is a non-empty string
|
|
1637
1659
|
if not isinstance(signature, str) or not signature.strip():
|
|
1638
|
-
|
|
1660
|
+
self.__raiseException(CLIOrionisValueError("Signature must be a non-empty string."))
|
|
1639
1661
|
|
|
1640
1662
|
try:
|
|
1641
1663
|
# Attempt to resume the job with the given signature
|
|
@@ -1652,7 +1674,7 @@ class Schedule(ISchedule):
|
|
|
1652
1674
|
# Return False if the job could not be resumed (e.g., it does not exist)
|
|
1653
1675
|
return False
|
|
1654
1676
|
|
|
1655
|
-
def
|
|
1677
|
+
def removeTask(self, signature: str) -> bool:
|
|
1656
1678
|
"""
|
|
1657
1679
|
Remove a scheduled job from the AsyncIO scheduler.
|
|
1658
1680
|
|
|
@@ -1681,7 +1703,7 @@ class Schedule(ISchedule):
|
|
|
1681
1703
|
|
|
1682
1704
|
# Validate that the signature is a non-empty string
|
|
1683
1705
|
if not isinstance(signature, str) or not signature.strip():
|
|
1684
|
-
|
|
1706
|
+
self.__raiseException(CLIOrionisValueError("Signature must be a non-empty string."))
|
|
1685
1707
|
|
|
1686
1708
|
try:
|
|
1687
1709
|
|
orionis/metadata/framework.py
CHANGED
|
@@ -25,7 +25,7 @@ orionis/console/contracts/command.py,sha256=vmAJD0yMQ5-AD_s9_xCFEAl64sKk65z7U2E1
|
|
|
25
25
|
orionis/console/contracts/event.py,sha256=GEgpmsyVGKJYi0LwvEklTm7aAHqsqUprtC2p6qq0eZU,120005
|
|
26
26
|
orionis/console/contracts/kernel.py,sha256=mh4LlhEYHh3FuGZZQ0GBhD6ZLa5YQvaNj2r01IIHI5Y,826
|
|
27
27
|
orionis/console/contracts/reactor.py,sha256=Xeq7Zrw6WE5MV_XOQfiQEchAFbb6-0TjLpjWOxYW--g,4554
|
|
28
|
-
orionis/console/contracts/schedule.py,sha256=
|
|
28
|
+
orionis/console/contracts/schedule.py,sha256=N-AYUa1CJY7a4CV9L1EX_EUDtGlDJMg4y0aV9EDby1Q,16090
|
|
29
29
|
orionis/console/contracts/schedule_event_listener.py,sha256=7fQdPh6X_npfGpQW_2x81D7-5Pe40jIog9uDeEU0kro,4390
|
|
30
30
|
orionis/console/contracts/scheduler.py,sha256=OW-a_YDDNPrenYT9z8Tv71VjyZ1aSzqzqhTBhTCZhGM,7698
|
|
31
31
|
orionis/console/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -84,7 +84,7 @@ orionis/console/request/cli_request.py,sha256=7-sgYmNUCipuHLVAwWLJiHv0cJCDmsM1Lu
|
|
|
84
84
|
orionis/console/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
85
85
|
orionis/console/tasks/event.py,sha256=yE64gWAWaaz-mlWk5LIKDh4HYO14iwRfdYfwFh7Wktk,166479
|
|
86
86
|
orionis/console/tasks/listener.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
87
|
-
orionis/console/tasks/schedule.py,sha256=
|
|
87
|
+
orionis/console/tasks/schedule.py,sha256=EQs1wmowaYxN8KBy-csj27ZXnza5xHctSbk3qr0-88I,83378
|
|
88
88
|
orionis/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
89
89
|
orionis/container/container.py,sha256=262gahG9L_72QovlHP7cF5QhFX4HTolwcYrVo86HcVg,93196
|
|
90
90
|
orionis/container/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -242,7 +242,7 @@ orionis/foundation/providers/scheduler_provider.py,sha256=1do4B09bU_6xbFHHVYYTGM
|
|
|
242
242
|
orionis/foundation/providers/testing_provider.py,sha256=SrJRpdvcblx9WvX7x9Y3zc7OQfiTf7la0HAJrm2ESlE,3725
|
|
243
243
|
orionis/foundation/providers/workers_provider.py,sha256=oa_2NIDH6UxZrtuGkkoo_zEoNIMGgJ46vg5CCgAm7wI,3926
|
|
244
244
|
orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
245
|
-
orionis/metadata/framework.py,sha256=
|
|
245
|
+
orionis/metadata/framework.py,sha256=iH8hUXm6LKEb4khPzo0501jhpYsPSCLa_DlR-u7Ct6k,4109
|
|
246
246
|
orionis/metadata/package.py,sha256=k7Yriyp5aUcR-iR8SK2ec_lf0_Cyc-C7JczgXa-I67w,16039
|
|
247
247
|
orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
248
248
|
orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -420,7 +420,7 @@ orionis/test/validators/web_report.py,sha256=n9BfzOZz6aEiNTypXcwuWbFRG0OdHNSmCNu
|
|
|
420
420
|
orionis/test/validators/workers.py,sha256=rWcdRexINNEmGaO7mnc1MKUxkHKxrTsVuHgbnIfJYgc,1206
|
|
421
421
|
orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
422
422
|
orionis/test/view/render.py,sha256=f-zNhtKSg9R5Njqujbg2l2amAs2-mRVESneLIkWOZjU,4082
|
|
423
|
-
orionis-0.
|
|
423
|
+
orionis-0.538.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
|
|
424
424
|
tests/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
425
425
|
tests/container/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
426
426
|
tests/container/context/test_manager.py,sha256=wOwXpl9rHNfTTexa9GBKYMwK0_-KSQPbI-AEyGNkmAE,1356
|
|
@@ -566,8 +566,8 @@ tests/testing/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
566
566
|
tests/testing/validators/test_testing_validators.py,sha256=WPo5GxTP6xE-Dw3X1vZoqOMpb6HhokjNSbgDsDRDvy4,16588
|
|
567
567
|
tests/testing/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
568
568
|
tests/testing/view/test_render.py,sha256=tnnMBwS0iKUIbogLvu-7Rii50G6Koddp3XT4wgdFEYM,1050
|
|
569
|
-
orionis-0.
|
|
570
|
-
orionis-0.
|
|
571
|
-
orionis-0.
|
|
572
|
-
orionis-0.
|
|
573
|
-
orionis-0.
|
|
569
|
+
orionis-0.538.0.dist-info/METADATA,sha256=4fH1vZ-4R_AT8VmMWs3HzV8vZFOmPCB7f-gr2fDH54Y,4801
|
|
570
|
+
orionis-0.538.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
571
|
+
orionis-0.538.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
|
572
|
+
orionis-0.538.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
573
|
+
orionis-0.538.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|