orionis 0.566.0__py3-none-any.whl → 0.567.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/base/scheduler.py +4 -4
- orionis/console/contracts/base_scheduler.py +4 -4
- orionis/console/entities/command.py +9 -7
- orionis/console/entities/event.py +29 -22
- orionis/console/entities/event_job.py +58 -44
- orionis/console/entities/scheduler_error.py +19 -6
- orionis/console/entities/scheduler_event_data.py +7 -10
- orionis/console/entities/scheduler_paused.py +12 -4
- orionis/console/entities/scheduler_resumed.py +7 -7
- orionis/console/entities/scheduler_shutdown.py +15 -7
- orionis/console/entities/scheduler_started.py +15 -7
- orionis/console/stub/command.stub +35 -16
- orionis/console/stub/listener.stub +0 -18
- orionis/metadata/framework.py +1 -1
- {orionis-0.566.0.dist-info → orionis-0.567.0.dist-info}/METADATA +1 -1
- {orionis-0.566.0.dist-info → orionis-0.567.0.dist-info}/RECORD +19 -35
- orionis/console/entities/all_jobs_removed.py +0 -23
- orionis/console/entities/executor_added.py +0 -23
- orionis/console/entities/executor_removed.py +0 -25
- orionis/console/entities/job_added.py +0 -24
- orionis/console/entities/job_error.py +0 -35
- orionis/console/entities/job_event_data.py +0 -40
- orionis/console/entities/job_executed.py +0 -31
- orionis/console/entities/job_max_instances.py +0 -27
- orionis/console/entities/job_missed.py +0 -25
- orionis/console/entities/job_modified.py +0 -22
- orionis/console/entities/job_pause.py +0 -22
- orionis/console/entities/job_removed.py +0 -22
- orionis/console/entities/job_resume.py +0 -25
- orionis/console/entities/job_store_added.py +0 -24
- orionis/console/entities/job_store_removed.py +0 -25
- orionis/console/entities/job_submitted.py +0 -24
- {orionis-0.566.0.dist-info → orionis-0.567.0.dist-info}/WHEEL +0 -0
- {orionis-0.566.0.dist-info → orionis-0.567.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.566.0.dist-info → orionis-0.567.0.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
from datetime import datetime
|
2
2
|
from orionis.console.contracts.base_scheduler import IBaseScheduler
|
3
3
|
from orionis.console.contracts.schedule import ISchedule
|
4
|
-
from orionis.console.entities.
|
4
|
+
from orionis.console.entities.scheduler_error import SchedulerError
|
5
5
|
from orionis.console.entities.scheduler_paused import SchedulerPaused
|
6
6
|
from orionis.console.entities.scheduler_resumed import SchedulerResumed
|
7
7
|
from orionis.console.entities.scheduler_shutdown import SchedulerShutdown
|
@@ -163,17 +163,17 @@ class BaseScheduler(IBaseScheduler):
|
|
163
163
|
"""
|
164
164
|
pass
|
165
165
|
|
166
|
-
async def onError(self, event:
|
166
|
+
async def onError(self, event: SchedulerError, schedule: ISchedule):
|
167
167
|
"""
|
168
168
|
Handles the event triggered when a job encounters an error during execution.
|
169
169
|
|
170
|
-
This method is invoked when a job fails due to an exception. It processes the `
|
170
|
+
This method is invoked when a job fails due to an exception. It processes the `SchedulerError`
|
171
171
|
event and performs any necessary actions, such as logging the error details or notifying
|
172
172
|
relevant systems about the failure.
|
173
173
|
|
174
174
|
Parameters
|
175
175
|
----------
|
176
|
-
event :
|
176
|
+
event : SchedulerError
|
177
177
|
The event object containing details about the job error, including the job ID,
|
178
178
|
the exception that occurred, and any relevant metadata.
|
179
179
|
schedule : ISchedule
|
@@ -1,6 +1,6 @@
|
|
1
1
|
from abc import ABC, abstractmethod
|
2
2
|
from orionis.console.contracts.schedule import ISchedule
|
3
|
-
from orionis.console.entities.
|
3
|
+
from orionis.console.entities.scheduler_error import SchedulerError
|
4
4
|
from orionis.console.entities.scheduler_paused import SchedulerPaused
|
5
5
|
from orionis.console.entities.scheduler_resumed import SchedulerResumed
|
6
6
|
from orionis.console.entities.scheduler_shutdown import SchedulerShutdown
|
@@ -157,17 +157,17 @@ class IBaseScheduler(ABC):
|
|
157
157
|
pass
|
158
158
|
|
159
159
|
@abstractmethod
|
160
|
-
async def onError(self, event:
|
160
|
+
async def onError(self, event: SchedulerError, schedule: ISchedule):
|
161
161
|
"""
|
162
162
|
Handles the event triggered when a job encounters an error during execution.
|
163
163
|
|
164
|
-
This method is invoked when a job fails due to an exception. It processes the `
|
164
|
+
This method is invoked when a job fails due to an exception. It processes the `SchedulerError`
|
165
165
|
event and performs any necessary actions, such as logging the error details or notifying
|
166
166
|
relevant systems about the failure.
|
167
167
|
|
168
168
|
Parameters
|
169
169
|
----------
|
170
|
-
event :
|
170
|
+
event : SchedulerError
|
171
171
|
The event object containing details about the job error, including the job ID,
|
172
172
|
the exception that occurred, and any relevant metadata.
|
173
173
|
schedule : ISchedule
|
@@ -12,14 +12,16 @@ class Command(BaseEntity):
|
|
12
12
|
----------
|
13
13
|
obj : Type
|
14
14
|
The type or class associated with the command.
|
15
|
-
|
16
|
-
|
15
|
+
method : str, optional
|
16
|
+
The method name to be invoked on the object. Defaults to 'hanldle'.
|
17
|
+
timestamps : bool, optional
|
18
|
+
Whether timestamps are enabled for this command. Defaults to True.
|
17
19
|
signature : str
|
18
20
|
The signature string representing the command usage.
|
19
21
|
description : str
|
20
22
|
A brief description of what the command does.
|
21
23
|
args : Optional[argparse.ArgumentParser], optional
|
22
|
-
Optional argument parser for command-line arguments.
|
24
|
+
Optional argument parser for command-line arguments. Defaults to None.
|
23
25
|
|
24
26
|
Returns
|
25
27
|
-------
|
@@ -30,11 +32,11 @@ class Command(BaseEntity):
|
|
30
32
|
# The type or class associated with the command
|
31
33
|
obj: Type
|
32
34
|
|
33
|
-
# The method name to be invoked on the object
|
35
|
+
# The method name to be invoked on the object (default: 'hanldle')
|
34
36
|
method: str = 'hanldle'
|
35
37
|
|
36
|
-
# Indicates if timestamps are enabled for this command
|
37
|
-
timestamps: bool
|
38
|
+
# Indicates if timestamps are enabled for this command (default: True)
|
39
|
+
timestamps: bool = True
|
38
40
|
|
39
41
|
# The command usage signature
|
40
42
|
signature: str
|
@@ -42,5 +44,5 @@ class Command(BaseEntity):
|
|
42
44
|
# Description of the command's purpose
|
43
45
|
description: str
|
44
46
|
|
45
|
-
# Optional argument parser for command-line arguments
|
47
|
+
# Optional argument parser for command-line arguments (default: None)
|
46
48
|
args: Optional[argparse.ArgumentParser] = None
|
@@ -9,30 +9,37 @@ from orionis.console.contracts.schedule_event_listener import IScheduleEventList
|
|
9
9
|
@dataclass(kw_only=True)
|
10
10
|
class Event:
|
11
11
|
"""
|
12
|
-
Represents
|
12
|
+
Represents a scheduled event with configuration for execution, timing, and event handling.
|
13
13
|
|
14
|
-
|
14
|
+
Parameters
|
15
15
|
----------
|
16
16
|
signature : str
|
17
|
-
|
18
|
-
args : Optional[List[str]]
|
19
|
-
|
20
|
-
purpose : Optional[str]
|
21
|
-
|
22
|
-
random_delay : Optional[int]
|
23
|
-
|
24
|
-
start_date : Optional[datetime]
|
25
|
-
The
|
26
|
-
end_date : Optional[datetime]
|
27
|
-
The
|
28
|
-
trigger : Optional[Union[CronTrigger, DateTrigger, IntervalTrigger]]
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
17
|
+
Unique identifier or signature for the event.
|
18
|
+
args : Optional[List[str]], default: []
|
19
|
+
List of arguments to be passed to the event.
|
20
|
+
purpose : Optional[str], default: None
|
21
|
+
Short description of the event's purpose.
|
22
|
+
random_delay : Optional[int], default: None
|
23
|
+
Random delay in seconds before the event is triggered.
|
24
|
+
start_date : Optional[datetime], default: None
|
25
|
+
The date and time when the event becomes active.
|
26
|
+
end_date : Optional[datetime], default: None
|
27
|
+
The date and time when the event is no longer active.
|
28
|
+
trigger : Optional[Union[CronTrigger, DateTrigger, IntervalTrigger]], default: None
|
29
|
+
Trigger mechanism that determines when the event is executed.
|
30
|
+
details : Optional[str], default: None
|
31
|
+
Additional metadata or information about the event.
|
32
|
+
listener : Optional[IScheduleEventListener], default: None
|
33
|
+
Listener object implementing IScheduleEventListener for event-specific logic.
|
34
|
+
max_instances : int, default: 1
|
35
|
+
Maximum number of concurrent instances allowed for the event.
|
36
|
+
misfire_grace_time : Optional[int], default: None
|
37
|
+
Grace period in seconds for handling misfired events.
|
38
|
+
|
39
|
+
Returns
|
40
|
+
-------
|
41
|
+
Event
|
42
|
+
An instance of the Event class with the specified configuration.
|
36
43
|
"""
|
37
44
|
|
38
45
|
# Unique identifier for the event
|
@@ -66,4 +73,4 @@ class Event:
|
|
66
73
|
max_instances: int = 1
|
67
74
|
|
68
75
|
# Grace time in seconds for misfired events
|
69
|
-
misfire_grace_time
|
76
|
+
misfire_grace_time: Optional[int] = None
|
@@ -5,56 +5,70 @@ from typing import Any, Callable, Optional, Tuple
|
|
5
5
|
@dataclass(kw_only=True)
|
6
6
|
class EventJob:
|
7
7
|
"""
|
8
|
-
Represents the main properties of a job in APScheduler.
|
8
|
+
Represents the main properties and configuration of a scheduled job in APScheduler.
|
9
9
|
|
10
|
-
|
10
|
+
Parameters
|
11
11
|
----------
|
12
12
|
id : str
|
13
13
|
Unique identifier for the job.
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
If None, no grace period is applied.
|
30
|
-
max_instances : int
|
31
|
-
Maximum number of concurrent instances of the job allowed.
|
32
|
-
coalesce : bool
|
33
|
-
Whether to merge pending executions into a single execution.
|
34
|
-
next_run_time : Optional[datetime]
|
35
|
-
The next scheduled execution time of the job. Can be None if the job is paused or unscheduled.
|
14
|
+
code : int, optional
|
15
|
+
Numeric code representing the job status or type. Defaults to 0.
|
16
|
+
name : Optional[str], optional
|
17
|
+
Human-readable name for the job. Defaults to None.
|
18
|
+
func : Callable[..., Any], optional
|
19
|
+
The function or coroutine to be executed by the job. Defaults to None.
|
20
|
+
args : Tuple[Any, ...], optional
|
21
|
+
Positional arguments to be passed to the function. Defaults to empty tuple.
|
22
|
+
trigger : Any, optional
|
23
|
+
The trigger that determines the job's execution schedule (e.g., IntervalTrigger, CronTrigger). Defaults to None.
|
24
|
+
executor : str, optional
|
25
|
+
Alias of the executor that will run the job. Defaults to 'default'.
|
26
|
+
jobstore : str, optional
|
27
|
+
Alias of the job store where the job is stored. Defaults to 'default'.
|
28
|
+
misfire_grace_time : Optional[int], optional
|
29
|
+
Grace period in seconds for handling missed executions. If None, no grace period is applied. Defaults to None.
|
30
|
+
max_instances : int, optional
|
31
|
+
Maximum number of concurrent instances of the job allowed. Defaults to 1.
|
32
|
+
coalesce : bool, optional
|
33
|
+
Whether to merge pending executions into a single execution. Defaults to False.
|
34
|
+
next_run_time : Optional[datetime], optional
|
35
|
+
The next scheduled execution time of the job. Can be None if the job is paused or unscheduled. Defaults to None.
|
36
|
+
exception : Optional[BaseException], optional
|
37
|
+
Exception raised during the last job execution, if any. Defaults to None.
|
38
|
+
traceback : Optional[str], optional
|
39
|
+
String representation of the traceback if an exception occurred. Defaults to None.
|
40
|
+
retval : Optional[Any], optional
|
41
|
+
Return value from the last job execution. Defaults to None.
|
42
|
+
purpose : Optional[str], optional
|
43
|
+
Description of the job's purpose. Defaults to None.
|
44
|
+
start_date : Optional[datetime], optional
|
45
|
+
The earliest possible run time for the job. Defaults to None.
|
46
|
+
end_date : Optional[datetime], optional
|
47
|
+
The latest possible run time for the job. Defaults to None.
|
48
|
+
details : Optional[str], optional
|
49
|
+
Additional details or metadata about the job. Defaults to None.
|
36
50
|
|
37
51
|
Returns
|
38
52
|
-------
|
39
53
|
None
|
40
|
-
This class is a data container and does not return any value.
|
54
|
+
This class is a data container and does not return any value upon instantiation.
|
41
55
|
"""
|
42
|
-
id: str
|
43
|
-
code: int = 0
|
44
|
-
name: Optional[str] = None
|
45
|
-
func: Callable[..., Any] = None
|
46
|
-
args: Tuple[Any, ...] = ()
|
47
|
-
trigger: Any = None
|
48
|
-
executor: str = 'default'
|
49
|
-
jobstore: str = 'default'
|
50
|
-
misfire_grace_time: Optional[int] = None
|
51
|
-
max_instances: int = 1
|
52
|
-
coalesce: bool = False
|
53
|
-
next_run_time: Optional[datetime] = None
|
54
|
-
exception: Optional[BaseException] = None
|
55
|
-
traceback: Optional[str] = None
|
56
|
-
retval: Optional[Any] = None
|
57
|
-
purpose: Optional[str] = None
|
58
|
-
start_date: Optional[datetime] = None
|
59
|
-
end_date: Optional[datetime] = None
|
60
|
-
details: Optional[str] = None
|
56
|
+
id: str # Unique identifier for the job
|
57
|
+
code: int = 0 # Numeric code for job status/type
|
58
|
+
name: Optional[str] = None # Human-readable job name
|
59
|
+
func: Callable[..., Any] = None # Function or coroutine to execute
|
60
|
+
args: Tuple[Any, ...] = () # Positional arguments for the function
|
61
|
+
trigger: Any = None # Scheduling trigger (e.g., interval, cron)
|
62
|
+
executor: str = 'default' # Executor alias
|
63
|
+
jobstore: str = 'default' # Job store alias
|
64
|
+
misfire_grace_time: Optional[int] = None # Grace period for missed executions
|
65
|
+
max_instances: int = 1 # Max concurrent job instances
|
66
|
+
coalesce: bool = False # Merge pending executions if True
|
67
|
+
next_run_time: Optional[datetime] = None # Next scheduled execution time
|
68
|
+
exception: Optional[BaseException] = None # Exception from last execution
|
69
|
+
traceback: Optional[str] = None # Traceback string if exception occurred
|
70
|
+
retval: Optional[Any] = None # Return value from last execution
|
71
|
+
purpose: Optional[str] = None # Description of job's purpose
|
72
|
+
start_date: Optional[datetime] = None # Earliest run time
|
73
|
+
end_date: Optional[datetime] = None # Latest run time
|
74
|
+
details: Optional[str] = None # Additional job details or metadata
|
@@ -5,15 +5,28 @@ from orionis.console.entities.scheduler_event_data import SchedulerEventData
|
|
5
5
|
@dataclass(kw_only=True)
|
6
6
|
class SchedulerError(SchedulerEventData):
|
7
7
|
"""
|
8
|
-
Represents an event triggered
|
8
|
+
Represents an error event triggered by the scheduler.
|
9
9
|
|
10
|
-
This class
|
11
|
-
|
10
|
+
This data class extends `SchedulerEventData` and is used to encapsulate
|
11
|
+
information related to errors that occur during scheduler operations.
|
12
|
+
It stores the exception that caused the error and the associated traceback
|
13
|
+
for debugging and logging purposes.
|
12
14
|
|
13
15
|
Attributes
|
14
16
|
----------
|
15
|
-
|
17
|
+
exception : Optional[BaseException]
|
18
|
+
The exception instance that caused the scheduler error, if any.
|
19
|
+
traceback : Optional[str]
|
20
|
+
The traceback string providing details about where the error occurred.
|
21
|
+
|
22
|
+
Returns
|
23
|
+
-------
|
24
|
+
SchedulerError
|
25
|
+
An instance containing details about the scheduler error event.
|
16
26
|
"""
|
17
27
|
|
18
|
-
|
19
|
-
|
28
|
+
# Exception that caused the scheduler error, if present
|
29
|
+
exception: Optional[BaseException] = None
|
30
|
+
|
31
|
+
# Traceback information related to the scheduler error, if available
|
32
|
+
traceback: Optional[str] = None
|
@@ -3,24 +3,21 @@ from dataclasses import dataclass
|
|
3
3
|
@dataclass(kw_only=True)
|
4
4
|
class SchedulerEventData:
|
5
5
|
"""
|
6
|
-
|
6
|
+
Base data structure for scheduler-related events.
|
7
7
|
|
8
|
-
This class
|
9
|
-
|
10
|
-
|
11
|
-
context.
|
8
|
+
This class encapsulates information about events that occur within the scheduler system.
|
9
|
+
It provides a numeric event code to identify the event type and can be extended for
|
10
|
+
additional context as needed.
|
12
11
|
|
13
|
-
|
12
|
+
Parameters
|
14
13
|
----------
|
15
14
|
code : int
|
16
|
-
|
17
|
-
scheduler system.
|
15
|
+
Numeric code that uniquely identifies the type of event within the scheduler system.
|
18
16
|
|
19
17
|
Returns
|
20
18
|
-------
|
21
19
|
SchedulerEventData
|
22
|
-
An instance of
|
23
|
-
and optional alias.
|
20
|
+
An instance of SchedulerEventData containing the event code.
|
24
21
|
"""
|
25
22
|
|
26
23
|
# Numeric code representing the type of event
|
@@ -6,12 +6,20 @@ class SchedulerPaused(SchedulerEventData):
|
|
6
6
|
"""
|
7
7
|
Represents an event triggered when the scheduler is paused.
|
8
8
|
|
9
|
-
This
|
10
|
-
|
9
|
+
This data class extends `SchedulerEventData` and encapsulates information
|
10
|
+
related to the scheduler pause event, such as the time at which the pause occurred.
|
11
11
|
|
12
12
|
Attributes
|
13
13
|
----------
|
14
|
-
|
14
|
+
time : str
|
15
|
+
The time when the scheduler was paused, formatted as a string.
|
16
|
+
(Other attributes are inherited from SchedulerEventData.)
|
17
|
+
|
18
|
+
Returns
|
19
|
+
-------
|
20
|
+
SchedulerPaused
|
21
|
+
An instance of SchedulerPaused containing information about the pause event.
|
15
22
|
"""
|
16
23
|
|
17
|
-
|
24
|
+
# The time when the scheduler was paused
|
25
|
+
time: str
|
@@ -6,19 +6,19 @@ class SchedulerResumed(SchedulerEventData):
|
|
6
6
|
"""
|
7
7
|
Represents an event triggered when the scheduler is resumed.
|
8
8
|
|
9
|
-
This class
|
10
|
-
|
11
|
-
about the resumption of the scheduler.
|
9
|
+
This data class extends `SchedulerEventData` and is used to encapsulate
|
10
|
+
information about the scheduler's resumption event.
|
12
11
|
|
13
12
|
Attributes
|
14
13
|
----------
|
15
|
-
|
14
|
+
time : str
|
15
|
+
The time when the scheduler was resumed.
|
16
16
|
|
17
17
|
Returns
|
18
18
|
-------
|
19
19
|
SchedulerResumed
|
20
|
-
An instance
|
21
|
-
the resumed scheduler event.
|
20
|
+
An instance containing information about the resumed scheduler event.
|
22
21
|
"""
|
23
22
|
|
24
|
-
|
23
|
+
# The time when the scheduler was resumed
|
24
|
+
time: str
|
@@ -6,18 +6,26 @@ class SchedulerShutdown(SchedulerEventData):
|
|
6
6
|
"""
|
7
7
|
Represents an event triggered when the scheduler shuts down.
|
8
8
|
|
9
|
-
This class
|
10
|
-
|
9
|
+
This class extends `SchedulerEventData` and is used to encapsulate
|
10
|
+
information related to the shutdown of the scheduler, such as the
|
11
|
+
shutdown time and the list of tasks present at shutdown.
|
11
12
|
|
12
13
|
Attributes
|
13
14
|
----------
|
14
|
-
|
15
|
-
|
15
|
+
time : str
|
16
|
+
The time when the scheduler was shut down.
|
17
|
+
tasks : list
|
18
|
+
The list of tasks that were scheduled at the time of shutdown.
|
16
19
|
|
17
20
|
Returns
|
18
21
|
-------
|
19
22
|
SchedulerShutdown
|
20
|
-
An instance
|
23
|
+
An instance representing the scheduler shutdown event, containing
|
24
|
+
the shutdown time and the list of scheduled tasks.
|
21
25
|
"""
|
22
|
-
|
23
|
-
|
26
|
+
|
27
|
+
# The time when the scheduler was shut down
|
28
|
+
time: str = ""
|
29
|
+
|
30
|
+
# List of tasks scheduled at the time of shutdown
|
31
|
+
tasks: list = field(default_factory=list)
|
@@ -4,19 +4,27 @@ from orionis.console.entities.scheduler_event_data import SchedulerEventData
|
|
4
4
|
@dataclass(kw_only=True)
|
5
5
|
class SchedulerStarted(SchedulerEventData):
|
6
6
|
"""
|
7
|
-
Represents
|
7
|
+
Represents the event data generated when the scheduler starts.
|
8
8
|
|
9
|
-
This
|
10
|
-
|
9
|
+
This data class extends `SchedulerEventData` and encapsulates information
|
10
|
+
about the scheduler's start event, such as the start time and the list of
|
11
|
+
tasks scheduled at that moment.
|
11
12
|
|
12
13
|
Attributes
|
13
14
|
----------
|
14
|
-
|
15
|
+
time : str
|
16
|
+
The time when the scheduler started.
|
17
|
+
tasks : list
|
18
|
+
The list of tasks that were scheduled at the time the scheduler started.
|
15
19
|
|
16
20
|
Returns
|
17
21
|
-------
|
18
22
|
SchedulerStarted
|
19
|
-
An instance
|
23
|
+
An instance containing the scheduler start event data.
|
20
24
|
"""
|
21
|
-
|
22
|
-
|
25
|
+
|
26
|
+
# The time when the scheduler started
|
27
|
+
time: str = ""
|
28
|
+
|
29
|
+
# List of tasks scheduled at the time of start
|
30
|
+
tasks: list = field(default_factory=list)
|
@@ -1,23 +1,42 @@
|
|
1
|
-
from orionis.console.args.argument import CLIArgument
|
2
1
|
from orionis.console.base.command import BaseCommand
|
2
|
+
from orionis.console.args.argument import CLIArgument
|
3
|
+
from orionis.console.exceptions.cli_runtime_error import CLIOrionisRuntimeError
|
3
4
|
|
4
|
-
class {{
|
5
|
+
class {{class_name}}(BaseCommand):
|
6
|
+
"""
|
7
|
+
Command: {{signature}}
|
8
|
+
{{description}}
|
9
|
+
"""
|
5
10
|
|
6
|
-
#
|
7
|
-
|
11
|
+
# Enable timestamps
|
12
|
+
timestamps: bool = True
|
8
13
|
|
9
|
-
#
|
10
|
-
|
14
|
+
# Command signature
|
15
|
+
signature: str = "{{signature}}"
|
11
16
|
|
12
|
-
#
|
13
|
-
|
14
|
-
|
15
|
-
|
17
|
+
# Command description
|
18
|
+
description: str = "{{description}}"
|
19
|
+
|
20
|
+
# Arguments (edit as needed)
|
21
|
+
arguments = [
|
22
|
+
CLIArgument(
|
23
|
+
flags=["--example", "-e"],
|
24
|
+
type=str,
|
25
|
+
help="Example argument for {{class_name}}",
|
26
|
+
default=None,
|
27
|
+
required=False,
|
28
|
+
metavar="EXAMPLE",
|
29
|
+
dest="example",
|
30
|
+
action="store",
|
31
|
+
),
|
16
32
|
]
|
17
33
|
|
18
|
-
async def handle(self) -> None:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
34
|
+
async def handle(self, *args, **kwargs) -> None:
|
35
|
+
try:
|
36
|
+
self.textSuccessBold("{{class_name}} executed successfully!")
|
37
|
+
example_value = self.argument("example")
|
38
|
+
if example_value:
|
39
|
+
self.info(f"Received argument: {example_value}")
|
40
|
+
|
41
|
+
except Exception as e:
|
42
|
+
raise CLIOrionisRuntimeError(f"An error occurred: {str(e)}") from e
|
@@ -40,24 +40,6 @@ class {{name-listener}}(BaseScheduleEventListener):
|
|
40
40
|
"""
|
41
41
|
pass
|
42
42
|
|
43
|
-
async def onSuccess(self, event: EventJob, schedule: ISchedule) -> None:
|
44
|
-
"""
|
45
|
-
Called when a job is successfully executed.
|
46
|
-
|
47
|
-
Parameters
|
48
|
-
----------
|
49
|
-
event : EventJob
|
50
|
-
The event containing details about the successful job execution.
|
51
|
-
schedule : ISchedule
|
52
|
-
The associated schedule instance managing the job.
|
53
|
-
|
54
|
-
Returns
|
55
|
-
-------
|
56
|
-
None
|
57
|
-
This method does not return any value.
|
58
|
-
"""
|
59
|
-
pass
|
60
|
-
|
61
43
|
async def onFailure(self, event: EventJob, schedule: ISchedule) -> None:
|
62
44
|
"""
|
63
45
|
Called when a job execution fails.
|
orionis/metadata/framework.py
CHANGED
@@ -6,7 +6,7 @@ orionis/console/args/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
6
6
|
orionis/console/args/argument.py,sha256=3Q_4p56qF0VPxK34xX3W4Ln2-Sua9rCHClGOeO96YcY,20355
|
7
7
|
orionis/console/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
orionis/console/base/command.py,sha256=jdUPc7MoJs9QWo_WEPV0Mb_7f6G563OWFTh7DJeUfM8,6642
|
9
|
-
orionis/console/base/scheduler.py,sha256=
|
9
|
+
orionis/console/base/scheduler.py,sha256=IKNhpI_lPbI8H3YruD9z7eNdjuqNYceaclx_Hr5BHfY,8065
|
10
10
|
orionis/console/base/scheduler_event_listener.py,sha256=X2mZBAYLBCtLOH7QSrCEaLeJ5m8Hq5UtGxaWRRvWbfo,4421
|
11
11
|
orionis/console/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
12
|
orionis/console/commands/cache.py,sha256=d-J6Qu5Xpp9z0BU4OOb--gp9zWfUZOWm_LEBKIO8k-o,2321
|
@@ -20,7 +20,7 @@ orionis/console/commands/version.py,sha256=u2f7SetqEX__ufG6c37Ga-CylT4FGvy6wgld6
|
|
20
20
|
orionis/console/commands/workflow.py,sha256=NYOmjTSvm2o6AE4h9LSTZMFSYPQreNmEJtronyOxaYk,2451
|
21
21
|
orionis/console/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
22
|
orionis/console/contracts/base_command.py,sha256=vmAJD0yMQ5-AD_s9_xCFEAl64sKk65z7U2E196dALQM,5760
|
23
|
-
orionis/console/contracts/base_scheduler.py,sha256=
|
23
|
+
orionis/console/contracts/base_scheduler.py,sha256=RSxEW57MoMU3pXfliIrQw9WuMk95p-xHXi1yACp1qsU,7728
|
24
24
|
orionis/console/contracts/cli_request.py,sha256=qIV8ig8PG39LYp1acnUD8GYsNRSHncxIxGjO3B3YsUo,6755
|
25
25
|
orionis/console/contracts/command.py,sha256=BOfRGpLRMsRS_a58584uO-MPK1UZGkmefLbFDtbk8ME,2911
|
26
26
|
orionis/console/contracts/console.py,sha256=phaQhCLWa81MLzB5ydOSaUfEIdDq7fOjvym8Rmi-arc,11908
|
@@ -39,31 +39,15 @@ orionis/console/dumper/debug.py,sha256=p8uflSXeDJDrVM9mZY4JMYEus73Z6TsLnQQtgP0QU
|
|
39
39
|
orionis/console/dynamic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
40
40
|
orionis/console/dynamic/progress_bar.py,sha256=58wne7E_QZb_uN9jjqQ_V28Ci19SVNhCQQ4zzXCiOu0,2872
|
41
41
|
orionis/console/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
42
|
-
orionis/console/entities/
|
43
|
-
orionis/console/entities/
|
44
|
-
orionis/console/entities/
|
45
|
-
orionis/console/entities/
|
46
|
-
orionis/console/entities/
|
47
|
-
orionis/console/entities/
|
48
|
-
orionis/console/entities/
|
49
|
-
orionis/console/entities/
|
50
|
-
orionis/console/entities/
|
51
|
-
orionis/console/entities/job_executed.py,sha256=mrjL_-w-BJzri1E3Xbl2cnPl6e6Ynanm4SFDijaEGfE,1002
|
52
|
-
orionis/console/entities/job_max_instances.py,sha256=MwU4P9xhLBwUyhPGDLxXrbtmKZ5BQP-9go4RGiPHW0o,956
|
53
|
-
orionis/console/entities/job_missed.py,sha256=sIHLGBy9NEGlR339pm6nbT4y4d1NWlerH_vNE5S-AYE,848
|
54
|
-
orionis/console/entities/job_modified.py,sha256=s12KMTtuHVX8U6XqGaFs_58oj4jwnZNJeZc7l1bXv7A,634
|
55
|
-
orionis/console/entities/job_pause.py,sha256=oLN28duhcu6Nm-wVhsTY458_3ucPc9G3Wogit3i16Pk,693
|
56
|
-
orionis/console/entities/job_removed.py,sha256=8Xp12158cmulyhgmprZ043RDtTz88w5hTlcgueb7-0k,705
|
57
|
-
orionis/console/entities/job_resume.py,sha256=IwCkjO5zrPU59hruF264EQYrPDoSEp_j4QrwORRgkhc,814
|
58
|
-
orionis/console/entities/job_store_added.py,sha256=NoocJD3zSm7E8ZsUob8BdvKxveu9WdEqAtVPCzC8WII,735
|
59
|
-
orionis/console/entities/job_store_removed.py,sha256=wh53sf3Rkezo5hMQkWo-NToeCYwMOmp7BLa1ACVUnqo,740
|
60
|
-
orionis/console/entities/job_submitted.py,sha256=8ftGEOsDQxHYK2tunGA9_b-u581hPcvNnZ5NmmaMua0,731
|
61
|
-
orionis/console/entities/scheduler_error.py,sha256=4nedVmkx69IeZzmilCcH5AeghkS2zblwNpsK12bcxHQ,717
|
62
|
-
orionis/console/entities/scheduler_event_data.py,sha256=w8JF83axusNhCoY2hJ8PpZR3rQRu1l5g7wqT1GBqW08,811
|
63
|
-
orionis/console/entities/scheduler_paused.py,sha256=YwiVM2lDWOEdFHP4m-BLHFMiwQmZ6Cvknhl5FGDwf9M,557
|
64
|
-
orionis/console/entities/scheduler_resumed.py,sha256=GT-QvvP38Qhr9ZnrHTCuDKFubRdAi3yVh58_W0YXqlk,735
|
65
|
-
orionis/console/entities/scheduler_shutdown.py,sha256=vRFXUt3hxKueaT6M4335HFL3NO3pe8QB9CSMvW_4PB0,900
|
66
|
-
orionis/console/entities/scheduler_started.py,sha256=U0pduaFhWrEUJQws81jTjDmTp4Kxfy6ontq8rQN4Y6I,910
|
42
|
+
orionis/console/entities/command.py,sha256=NPdyG4U3JtDMOS7Em2_AklNyyuoTnKxyGseMWrADlc4,1571
|
43
|
+
orionis/console/entities/event.py,sha256=44exJIBMB8v_Dixv2qgatl2ln-Tmv7g2b63oetsJFHc,3015
|
44
|
+
orionis/console/entities/event_job.py,sha256=b8fbloHnf7qYtQ0W4d7MWw0jj4l07B0RtS3UkMJwE0M,4292
|
45
|
+
orionis/console/entities/scheduler_error.py,sha256=5cuEDHmszZFzNE_RYQ4U4T1snG4nieuN3jG43DPlAJE,1166
|
46
|
+
orionis/console/entities/scheduler_event_data.py,sha256=ujkVd--NxNADcOv2ZdkFuI6crZxVv-TEIJvNvPoQnC0,717
|
47
|
+
orionis/console/entities/scheduler_paused.py,sha256=tNhlJx4VVHrTeU9uaa8gNprSXymfCiV7Lv9xyqIS9Ug,819
|
48
|
+
orionis/console/entities/scheduler_resumed.py,sha256=A5eIuhqmQIUYEnfpCF8HHaoBOAGDJI2KLPB-j5Cesjc,697
|
49
|
+
orionis/console/entities/scheduler_shutdown.py,sha256=aXOhNgXFQT7vdUk05Ib7mjfd0-Y_A7jq66uok9v-nsM,1036
|
50
|
+
orionis/console/entities/scheduler_started.py,sha256=-ONkJSX3XhhT7JgqTb727St-tcowknI-GHocNrxf2AE,950
|
67
51
|
orionis/console/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
68
52
|
orionis/console/enums/actions.py,sha256=S3T-vWS6DJSGtANrq3od3-90iYAjPvJwaOZ2V02y34c,1222
|
69
53
|
orionis/console/enums/listener.py,sha256=bDHDOkKQFEfEmZyiisZj37ozr8Hs7_lKvm_3uYjvEpw,2988
|
@@ -81,8 +65,8 @@ orionis/console/output/console.py,sha256=EtSDWRBW8wk0iJdPfB1mzU49krLJBaSAUdVdVOz
|
|
81
65
|
orionis/console/output/executor.py,sha256=uQjFPOlyZLFj9pcyYPugCqxwJog0AJgK1OcmQH2ELbw,7314
|
82
66
|
orionis/console/request/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
83
67
|
orionis/console/request/cli_request.py,sha256=zFuoFzLVDCcSNcJZAuLAlsc9jfhck5o23qaKc2C0QAg,13231
|
84
|
-
orionis/console/stub/command.stub,sha256=
|
85
|
-
orionis/console/stub/listener.stub,sha256=
|
68
|
+
orionis/console/stub/command.stub,sha256=ATmJunhcRMGWkEKcwhJlnuAAzyGDMo9XGiPPp6xxwTQ,1258
|
69
|
+
orionis/console/stub/listener.stub,sha256=DbX-ghx2-vb73kzQ6L20lyg5vSKn58jSLTwFuwNQU9k,4331
|
86
70
|
orionis/console/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
87
71
|
orionis/console/tasks/schedule.py,sha256=qFnzoLyK69iaKEWMfEVxLs3S9aWVRzD4G6emTFhJMaY,83386
|
88
72
|
orionis/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -243,7 +227,7 @@ orionis/foundation/providers/scheduler_provider.py,sha256=1do4B09bU_6xbFHHVYYTGM
|
|
243
227
|
orionis/foundation/providers/testing_provider.py,sha256=SrJRpdvcblx9WvX7x9Y3zc7OQfiTf7la0HAJrm2ESlE,3725
|
244
228
|
orionis/foundation/providers/workers_provider.py,sha256=oa_2NIDH6UxZrtuGkkoo_zEoNIMGgJ46vg5CCgAm7wI,3926
|
245
229
|
orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
246
|
-
orionis/metadata/framework.py,sha256=
|
230
|
+
orionis/metadata/framework.py,sha256=H1bCNz2LPAeb0lblP84YyMuz5oV3s6sZg6tNOJXdgt0,4109
|
247
231
|
orionis/metadata/package.py,sha256=k7Yriyp5aUcR-iR8SK2ec_lf0_Cyc-C7JczgXa-I67w,16039
|
248
232
|
orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
249
233
|
orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -436,8 +420,8 @@ orionis/test/validators/workers.py,sha256=rWcdRexINNEmGaO7mnc1MKUxkHKxrTsVuHgbnI
|
|
436
420
|
orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
437
421
|
orionis/test/view/render.py,sha256=f-zNhtKSg9R5Njqujbg2l2amAs2-mRVESneLIkWOZjU,4082
|
438
422
|
orionis/test/view/report.stub,sha256=QLqqCdRoENr3ECiritRB3DO_MOjRQvgBh5jxZ3Hs1r0,28189
|
439
|
-
orionis-0.
|
440
|
-
orionis-0.
|
441
|
-
orionis-0.
|
442
|
-
orionis-0.
|
443
|
-
orionis-0.
|
423
|
+
orionis-0.567.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
|
424
|
+
orionis-0.567.0.dist-info/METADATA,sha256=w5agxagM2wQhVG0aRNo2DiVlYPE3JY9y3Ih9SR_Rmx4,4801
|
425
|
+
orionis-0.567.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
426
|
+
orionis-0.567.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
|
427
|
+
orionis-0.567.0.dist-info/RECORD,,
|
@@ -1,23 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from orionis.console.entities.scheduler_event_data import SchedulerEventData
|
3
|
-
|
4
|
-
@dataclass(kw_only=True)
|
5
|
-
class AllJobsRemoved(SchedulerEventData):
|
6
|
-
"""
|
7
|
-
Represents an event triggered when all jobs are removed from a specific job store.
|
8
|
-
|
9
|
-
This event is typically used to notify that a job store has been cleared of all its jobs.
|
10
|
-
|
11
|
-
Attributes
|
12
|
-
----------
|
13
|
-
jobstore : str
|
14
|
-
The alias or identifier of the job store from which all jobs were removed.
|
15
|
-
|
16
|
-
Returns
|
17
|
-
-------
|
18
|
-
None
|
19
|
-
This class does not return a value; it is used to encapsulate event data.
|
20
|
-
"""
|
21
|
-
|
22
|
-
# The alias of the job store from which jobs were removed
|
23
|
-
jobstore: str
|
@@ -1,23 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from orionis.console.entities.scheduler_event_data import SchedulerEventData
|
3
|
-
|
4
|
-
@dataclass(kw_only=True)
|
5
|
-
class ExecutorAdded(SchedulerEventData):
|
6
|
-
"""
|
7
|
-
Represents an event triggered when an executor is added to the system.
|
8
|
-
|
9
|
-
This event is used to notify that a new executor has been successfully added.
|
10
|
-
|
11
|
-
Attributes
|
12
|
-
----------
|
13
|
-
alias : str
|
14
|
-
The unique alias or identifier of the added executor.
|
15
|
-
|
16
|
-
Returns
|
17
|
-
-------
|
18
|
-
ExecutorAdded
|
19
|
-
An instance of the ExecutorAdded event containing the alias of the added executor.
|
20
|
-
"""
|
21
|
-
|
22
|
-
# The alias of the added executor, used to uniquely identify it
|
23
|
-
alias: str
|
@@ -1,25 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from orionis.console.entities.scheduler_event_data import SchedulerEventData
|
3
|
-
|
4
|
-
@dataclass(kw_only=True)
|
5
|
-
class ExecutorRemoved(SchedulerEventData):
|
6
|
-
"""
|
7
|
-
Represents an event triggered when an executor is removed.
|
8
|
-
|
9
|
-
This event is used to notify the system that a specific executor, identified
|
10
|
-
by its alias, has been removed from the scheduler.
|
11
|
-
|
12
|
-
Attributes
|
13
|
-
----------
|
14
|
-
alias : str
|
15
|
-
The alias (unique identifier) of the removed executor.
|
16
|
-
|
17
|
-
Returns
|
18
|
-
-------
|
19
|
-
None
|
20
|
-
This class does not return a value; it is used as a data structure
|
21
|
-
to encapsulate event information.
|
22
|
-
"""
|
23
|
-
|
24
|
-
# The alias of the removed executor
|
25
|
-
alias: str
|
@@ -1,24 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from orionis.console.entities.job_event_data import JobEventData
|
3
|
-
|
4
|
-
@dataclass(kw_only=True)
|
5
|
-
class JobAdded(JobEventData):
|
6
|
-
"""
|
7
|
-
Represents an event triggered when a job is added to a job store.
|
8
|
-
|
9
|
-
This class extends the `JobEventData` base class, inheriting its attributes
|
10
|
-
and functionality. It is used to encapsulate data related to the addition
|
11
|
-
of a job in the system.
|
12
|
-
|
13
|
-
Attributes
|
14
|
-
----------
|
15
|
-
Inherits all attributes from the `JobEventData` base class.
|
16
|
-
|
17
|
-
Returns
|
18
|
-
-------
|
19
|
-
JobAdded
|
20
|
-
An instance of the `JobAdded` class containing data about the added job.
|
21
|
-
"""
|
22
|
-
|
23
|
-
# This class currently does not define additional attributes or methods.
|
24
|
-
# It serves as a specialized event type for job addition events.
|
@@ -1,35 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from datetime import datetime
|
3
|
-
from orionis.console.entities.job_event_data import JobEventData
|
4
|
-
|
5
|
-
@dataclass(kw_only=True)
|
6
|
-
class JobError(JobEventData):
|
7
|
-
"""
|
8
|
-
Represents an event triggered when a job raises an exception during execution.
|
9
|
-
|
10
|
-
This class is used to encapsulate information about an error that occurred
|
11
|
-
during the execution of a scheduled job, including the time the job was
|
12
|
-
scheduled to run, the exception raised, and the traceback details.
|
13
|
-
|
14
|
-
Attributes
|
15
|
-
----------
|
16
|
-
scheduled_run_time : datetime
|
17
|
-
The datetime when the job was scheduled to run.
|
18
|
-
exception : Exception
|
19
|
-
The exception instance raised by the job during execution.
|
20
|
-
traceback : str
|
21
|
-
The traceback string providing details about where the exception occurred.
|
22
|
-
|
23
|
-
Returns
|
24
|
-
-------
|
25
|
-
JobError
|
26
|
-
An instance of the `JobError` class containing details about the job error event.
|
27
|
-
"""
|
28
|
-
# The time the job was scheduled to run
|
29
|
-
scheduled_run_time: datetime
|
30
|
-
|
31
|
-
# The exception raised during the job's execution
|
32
|
-
exception: Exception
|
33
|
-
|
34
|
-
# The traceback string providing details about the exception
|
35
|
-
traceback: str
|
@@ -1,40 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from typing import Optional
|
3
|
-
from orionis.console.entities.scheduler_event_data import SchedulerEventData
|
4
|
-
|
5
|
-
@dataclass(kw_only=True)
|
6
|
-
class JobEventData(SchedulerEventData):
|
7
|
-
"""
|
8
|
-
Represents the base class for events related to jobs in the scheduler system.
|
9
|
-
|
10
|
-
This class extends `SchedulerEventData` and provides additional attributes
|
11
|
-
specific to job-related events, such as the job's identifier and the job store
|
12
|
-
where it resides.
|
13
|
-
|
14
|
-
Attributes
|
15
|
-
----------
|
16
|
-
code : int
|
17
|
-
A numeric code that uniquely identifies the type of event within the
|
18
|
-
scheduler system. (Inherited from `SchedulerEventData`)
|
19
|
-
alias : str, optional
|
20
|
-
An optional string providing additional context or identifying specific
|
21
|
-
components (e.g., executors or job stores) related to the event.
|
22
|
-
(Inherited from `SchedulerEventData`)
|
23
|
-
job_id : str
|
24
|
-
The unique identifier of the job associated with the event.
|
25
|
-
jobstore : str, optional
|
26
|
-
The name of the job store where the job is located. If not specified,
|
27
|
-
it defaults to `None`.
|
28
|
-
|
29
|
-
Returns
|
30
|
-
-------
|
31
|
-
JobEventData
|
32
|
-
An instance of the `JobEventData` class containing information about
|
33
|
-
the job-related event.
|
34
|
-
"""
|
35
|
-
|
36
|
-
# The unique identifier of the job
|
37
|
-
job_id: str
|
38
|
-
|
39
|
-
# The name of the job store where the job resides (optional)
|
40
|
-
jobstore: Optional[str] = None
|
@@ -1,31 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from datetime import datetime
|
3
|
-
from typing import Any
|
4
|
-
from orionis.console.entities.job_event_data import JobEventData
|
5
|
-
|
6
|
-
@dataclass(kw_only=True)
|
7
|
-
class JobExecuted(JobEventData):
|
8
|
-
"""
|
9
|
-
Represents an event triggered when a job completes successfully.
|
10
|
-
|
11
|
-
This class is used to encapsulate information about a successfully executed job,
|
12
|
-
including the time it was scheduled to run and the return value of the job function.
|
13
|
-
|
14
|
-
Attributes
|
15
|
-
----------
|
16
|
-
scheduled_run_time : datetime
|
17
|
-
The datetime when the job was scheduled to execute.
|
18
|
-
retval : Any
|
19
|
-
The return value produced by the job function upon successful execution.
|
20
|
-
|
21
|
-
Returns
|
22
|
-
-------
|
23
|
-
JobExecuted
|
24
|
-
An instance of the `JobExecuted` class containing details about the executed job.
|
25
|
-
"""
|
26
|
-
|
27
|
-
# The datetime when the job was scheduled to run
|
28
|
-
scheduled_run_time: datetime
|
29
|
-
|
30
|
-
# The return value of the job function
|
31
|
-
retval: Any
|
@@ -1,27 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from datetime import datetime
|
3
|
-
from orionis.console.entities.job_event_data import JobEventData
|
4
|
-
|
5
|
-
@dataclass(kw_only=True)
|
6
|
-
class JobMaxInstances(JobEventData):
|
7
|
-
"""
|
8
|
-
Represents an event triggered when a job exceeds its maximum allowed instances.
|
9
|
-
|
10
|
-
This class is a specialized event data structure that inherits from `JobEventData`.
|
11
|
-
It is used to capture and store information about the event when a job exceeds
|
12
|
-
the maximum number of instances it is allowed to run.
|
13
|
-
|
14
|
-
Attributes
|
15
|
-
----------
|
16
|
-
run_time : datetime
|
17
|
-
The datetime when the job was scheduled to run. This indicates the time
|
18
|
-
the job was supposed to execute before exceeding the instance limit.
|
19
|
-
|
20
|
-
Returns
|
21
|
-
-------
|
22
|
-
JobMaxInstances
|
23
|
-
An instance of the `JobMaxInstances` class containing the event details.
|
24
|
-
"""
|
25
|
-
|
26
|
-
# The time the job was scheduled to run
|
27
|
-
run_time: datetime
|
@@ -1,25 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from datetime import datetime
|
3
|
-
from orionis.console.entities.job_event_data import JobEventData
|
4
|
-
|
5
|
-
@dataclass(kw_only=True)
|
6
|
-
class JobMissed(JobEventData):
|
7
|
-
"""
|
8
|
-
Represents an event triggered when a scheduled job run is missed due to scheduler constraints.
|
9
|
-
|
10
|
-
This class extends `JobEventData` and provides additional information about the missed job event,
|
11
|
-
specifically the time the job was originally scheduled to run.
|
12
|
-
|
13
|
-
Attributes
|
14
|
-
----------
|
15
|
-
scheduled_run_time : datetime
|
16
|
-
The datetime when the job was originally scheduled to execute.
|
17
|
-
|
18
|
-
Returns
|
19
|
-
-------
|
20
|
-
None
|
21
|
-
This class does not return a value; it is used to encapsulate event data.
|
22
|
-
"""
|
23
|
-
|
24
|
-
# The datetime when the job was supposed to run but was missed
|
25
|
-
scheduled_run_time: datetime
|
@@ -1,22 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from orionis.console.entities.job_event_data import JobEventData
|
3
|
-
|
4
|
-
@dataclass(kw_only=True)
|
5
|
-
class JobModified(JobEventData):
|
6
|
-
"""
|
7
|
-
Represents an event triggered when a job is modified in a job store.
|
8
|
-
|
9
|
-
This class is a data structure that extends `JobEventData` to provide
|
10
|
-
additional context or functionality specific to job modification events.
|
11
|
-
|
12
|
-
Attributes
|
13
|
-
----------
|
14
|
-
(Inherited from JobEventData)
|
15
|
-
|
16
|
-
Returns
|
17
|
-
-------
|
18
|
-
None
|
19
|
-
This class does not return a value; it is used as a data container.
|
20
|
-
"""
|
21
|
-
|
22
|
-
next_run_time: str | None = None
|
@@ -1,22 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from orionis.console.entities.job_event_data import JobEventData
|
3
|
-
|
4
|
-
@dataclass(kw_only=True)
|
5
|
-
class JobPause(JobEventData):
|
6
|
-
"""
|
7
|
-
Represents an event triggered when a job is paused in the job store.
|
8
|
-
|
9
|
-
This class extends `JobEventData` to provide additional context or
|
10
|
-
functionality specific to the pausing of a job.
|
11
|
-
|
12
|
-
Attributes
|
13
|
-
----------
|
14
|
-
(Inherited from JobEventData)
|
15
|
-
|
16
|
-
Returns
|
17
|
-
-------
|
18
|
-
JobPause
|
19
|
-
An instance of the `JobPause` class representing the pause event.
|
20
|
-
"""
|
21
|
-
# This class does not define additional attributes or methods.
|
22
|
-
# It serves as a specialized event type for job pausing.
|
@@ -1,22 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from orionis.console.entities.job_event_data import JobEventData
|
3
|
-
|
4
|
-
@dataclass(kw_only=True)
|
5
|
-
class JobRemoved(JobEventData):
|
6
|
-
"""
|
7
|
-
Represents an event triggered when a job is removed from a job store.
|
8
|
-
|
9
|
-
This class extends `JobEventData` to provide additional context or
|
10
|
-
functionality specific to the removal of a job.
|
11
|
-
|
12
|
-
Attributes
|
13
|
-
----------
|
14
|
-
(Inherited from JobEventData)
|
15
|
-
|
16
|
-
Returns
|
17
|
-
-------
|
18
|
-
JobRemoved
|
19
|
-
An instance of the `JobRemoved` class representing the removal event.
|
20
|
-
"""
|
21
|
-
# No additional attributes or methods are defined here; this class
|
22
|
-
# serves as a specialized event type for job removal.
|
@@ -1,25 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from orionis.console.entities.job_event_data import JobEventData
|
3
|
-
|
4
|
-
@dataclass(kw_only=True)
|
5
|
-
class JobResume(JobEventData):
|
6
|
-
"""
|
7
|
-
Represents an event triggered when a job is resumed from a paused state.
|
8
|
-
|
9
|
-
This class extends `JobEventData` to provide additional context or
|
10
|
-
functionality specific to the resumption of a job.
|
11
|
-
|
12
|
-
Attributes
|
13
|
-
----------
|
14
|
-
(Inherited from JobEventData)
|
15
|
-
All attributes from the parent class `JobEventData` are available
|
16
|
-
in this class.
|
17
|
-
|
18
|
-
Returns
|
19
|
-
-------
|
20
|
-
JobResume
|
21
|
-
An instance of the `JobResume` class representing the resumption event.
|
22
|
-
"""
|
23
|
-
|
24
|
-
# This class does not define additional attributes or methods.
|
25
|
-
# It serves as a specialized event type for job resumption.
|
@@ -1,24 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from orionis.console.entities.scheduler_event_data import SchedulerEventData
|
3
|
-
|
4
|
-
@dataclass(kw_only=True)
|
5
|
-
class JobstoreAdded(SchedulerEventData):
|
6
|
-
"""
|
7
|
-
Event triggered when a job store is added to the scheduler.
|
8
|
-
|
9
|
-
This event is used to notify that a new job store has been successfully added to the scheduler.
|
10
|
-
It provides the alias of the added job store, which can be used to identify it.
|
11
|
-
|
12
|
-
Attributes
|
13
|
-
----------
|
14
|
-
alias : str
|
15
|
-
The alias (name) of the added job store.
|
16
|
-
|
17
|
-
Returns
|
18
|
-
-------
|
19
|
-
None
|
20
|
-
This class does not return a value; it is used to encapsulate event data.
|
21
|
-
"""
|
22
|
-
|
23
|
-
# The alias of the added job store
|
24
|
-
alias: str
|
@@ -1,25 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from orionis.console.entities.scheduler_event_data import SchedulerEventData
|
3
|
-
|
4
|
-
@dataclass(kw_only=True)
|
5
|
-
class JobstoreRemoved(SchedulerEventData):
|
6
|
-
"""
|
7
|
-
Represents an event triggered when a job store is removed.
|
8
|
-
|
9
|
-
This event is typically used to notify the system or other components
|
10
|
-
that a specific job store has been removed, allowing for any necessary
|
11
|
-
cleanup or updates.
|
12
|
-
|
13
|
-
Attributes
|
14
|
-
----------
|
15
|
-
alias : str
|
16
|
-
The alias (unique identifier) of the removed job store.
|
17
|
-
|
18
|
-
Returns
|
19
|
-
-------
|
20
|
-
None
|
21
|
-
This class does not return a value; it is used to encapsulate event data.
|
22
|
-
"""
|
23
|
-
|
24
|
-
# The alias of the removed job store
|
25
|
-
alias: str
|
@@ -1,24 +0,0 @@
|
|
1
|
-
from dataclasses import dataclass
|
2
|
-
from datetime import datetime
|
3
|
-
from orionis.console.entities.job_event_data import JobEventData
|
4
|
-
|
5
|
-
@dataclass(kw_only=True)
|
6
|
-
class JobSubmitted(JobEventData):
|
7
|
-
"""
|
8
|
-
Represents an event triggered when a job is submitted to an executor.
|
9
|
-
|
10
|
-
This class extends `JobEventData` and includes additional information
|
11
|
-
about the scheduled execution time of the job.
|
12
|
-
|
13
|
-
Attributes
|
14
|
-
----------
|
15
|
-
run_time : datetime
|
16
|
-
The datetime when the job is scheduled to run.
|
17
|
-
|
18
|
-
Returns
|
19
|
-
-------
|
20
|
-
None
|
21
|
-
This class does not return a value; it is used to encapsulate event data.
|
22
|
-
"""
|
23
|
-
# The datetime when the job is scheduled to run
|
24
|
-
run_time: datetime
|
File without changes
|
File without changes
|
File without changes
|