orionis 0.565.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.
Files changed (38) hide show
  1. orionis/console/base/scheduler.py +4 -4
  2. orionis/console/contracts/base_scheduler.py +4 -4
  3. orionis/console/entities/command.py +9 -7
  4. orionis/console/entities/event.py +29 -22
  5. orionis/console/entities/event_job.py +58 -44
  6. orionis/console/entities/scheduler_error.py +19 -6
  7. orionis/console/entities/scheduler_event_data.py +7 -10
  8. orionis/console/entities/scheduler_paused.py +12 -4
  9. orionis/console/entities/scheduler_resumed.py +7 -7
  10. orionis/console/entities/scheduler_shutdown.py +15 -7
  11. orionis/console/entities/scheduler_started.py +15 -7
  12. orionis/console/stub/command.stub +35 -16
  13. orionis/console/stub/listener.stub +0 -18
  14. orionis/foundation/providers/dumper_provider.py +1 -1
  15. orionis/metadata/framework.py +1 -1
  16. orionis/test/output/dumper.py +1 -1
  17. {orionis-0.565.0.dist-info → orionis-0.567.0.dist-info}/METADATA +1 -1
  18. {orionis-0.565.0.dist-info → orionis-0.567.0.dist-info}/RECORD +22 -38
  19. orionis/console/entities/all_jobs_removed.py +0 -23
  20. orionis/console/entities/executor_added.py +0 -23
  21. orionis/console/entities/executor_removed.py +0 -25
  22. orionis/console/entities/job_added.py +0 -24
  23. orionis/console/entities/job_error.py +0 -35
  24. orionis/console/entities/job_event_data.py +0 -40
  25. orionis/console/entities/job_executed.py +0 -31
  26. orionis/console/entities/job_max_instances.py +0 -27
  27. orionis/console/entities/job_missed.py +0 -25
  28. orionis/console/entities/job_modified.py +0 -22
  29. orionis/console/entities/job_pause.py +0 -22
  30. orionis/console/entities/job_removed.py +0 -22
  31. orionis/console/entities/job_resume.py +0 -25
  32. orionis/console/entities/job_store_added.py +0 -24
  33. orionis/console/entities/job_store_removed.py +0 -25
  34. orionis/console/entities/job_submitted.py +0 -24
  35. /orionis/console/dumper/{dump.py → debug.py} +0 -0
  36. {orionis-0.565.0.dist-info → orionis-0.567.0.dist-info}/WHEEL +0 -0
  37. {orionis-0.565.0.dist-info → orionis-0.567.0.dist-info}/licenses/LICENCE +0 -0
  38. {orionis-0.565.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.job_error import JobError
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: JobError, schedule: ISchedule):
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 `JobError`
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 : JobError
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.job_error import JobError
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: JobError, schedule: ISchedule):
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 `JobError`
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 : JobError
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
- timestamps : bool
16
- Whether timestamps are enabled for this command.
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 an event with scheduling and execution details.
12
+ Represents a scheduled event with configuration for execution, timing, and event handling.
13
13
 
14
- Attributes
14
+ Parameters
15
15
  ----------
16
16
  signature : str
17
- The unique identifier or signature of the event, used to distinguish it from other events.
18
- args : Optional[List[str]]
19
- A list of arguments associated with the event. Defaults to an empty list if not provided.
20
- purpose : Optional[str]
21
- A brief description of the event's purpose or intent. Can be None if not specified.
22
- random_delay : Optional[int]
23
- An optional random delay (in seconds) to be applied before the event is triggered. Can be None.
24
- start_date : Optional[datetime]
25
- The start date and time for the event. If None, the event starts immediately or based on the trigger.
26
- end_date : Optional[datetime]
27
- The end date and time for the event. If None, the event does not have a defined end time.
28
- trigger : Optional[Union[CronTrigger, DateTrigger, IntervalTrigger]]
29
- The trigger mechanism for the event, which determines when and how the event is executed.
30
- Can be a CronTrigger, DateTrigger, or IntervalTrigger. Defaults to None.
31
- details : Optional[str]
32
- Additional details or metadata about the event. Can be None if not specified.
33
- listener : Optional[IScheduleEventListener]
34
- An optional listener object that implements the IScheduleEventListener interface.
35
- This listener can handle event-specific logic. Defaults to None.
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 : Optional[int] = None
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
- Attributes
10
+ Parameters
11
11
  ----------
12
12
  id : str
13
13
  Unique identifier for the job.
14
- name : Optional[str]
15
- Human-readable name for the job. Can be None if not specified.
16
- func : Callable[..., Any]
17
- The function or coroutine to be executed by the job.
18
- args : Tuple[Any, ...]
19
- Positional arguments to be passed to the function.
20
- trigger : Any
21
- The trigger that determines the job's execution schedule
22
- (e.g., IntervalTrigger, CronTrigger, etc.).
23
- executor : str
24
- Alias of the executor that will run the job.
25
- jobstore : str
26
- Alias of the job store where the job is stored.
27
- misfire_grace_time : Optional[int]
28
- Grace period in seconds for handling missed executions.
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 when the scheduler is paused.
8
+ Represents an error event triggered by the scheduler.
9
9
 
10
- This class is a data structure that inherits from `SchedulerEventData`
11
- and is used to encapsulate information related to the scheduler pause event.
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
- (Inherited from SchedulerEventData)
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
- exception: Optional[BaseException] = None # Exception that caused the scheduler error
19
- traceback: Optional[str] = None # Traceback information related to the scheduler error
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
- Represents the data associated with scheduler-related events.
6
+ Base data structure for scheduler-related events.
7
7
 
8
- This class serves as a base structure for encapsulating information about
9
- events occurring within the scheduler system. It includes a numeric event
10
- code to identify the type of event and an optional alias for additional
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
- Attributes
12
+ Parameters
14
13
  ----------
15
14
  code : int
16
- A numeric code that uniquely identifies the type of event within the
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 the `SchedulerEventData` class containing the event code
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 class is a data structure that inherits from `SchedulerEventData`
10
- and is used to encapsulate information related to the scheduler pause event.
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
- (Inherited from SchedulerEventData)
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
- time: str # Time when the scheduler was paused
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 is a specialized data structure that inherits from
10
- `SchedulerEventData` and is used to encapsulate information
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
- (Inherited from SchedulerEventData)
14
+ time : str
15
+ The time when the scheduler was resumed.
16
16
 
17
17
  Returns
18
18
  -------
19
19
  SchedulerResumed
20
- An instance of the `SchedulerResumed` class representing
21
- the resumed scheduler event.
20
+ An instance containing information about the resumed scheduler event.
22
21
  """
23
22
 
24
- time: str # The time when the scheduler was resumed
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 is a specialized type of `SchedulerEventData` that is used to
10
- encapsulate information related to the shutdown of the scheduler.
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
- (No additional attributes are defined in this class. It inherits all attributes
15
- from `SchedulerEventData`.)
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 of the `SchedulerShutdown` class representing the shutdown event.
23
+ An instance representing the scheduler shutdown event, containing
24
+ the shutdown time and the list of scheduled tasks.
21
25
  """
22
- time: str = "" # The time when the scheduler started
23
- tasks: list = field(default_factory=list) # List of tasks scheduled at the time of start
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 an event triggered when the scheduler starts running.
7
+ Represents the event data generated when the scheduler starts.
8
8
 
9
- This class is a data structure that inherits from `SchedulerEventData`
10
- and is used to encapsulate information about the scheduler's start event.
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
- (No additional attributes are defined in this class; it inherits all attributes from `SchedulerEventData`.)
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 of the `SchedulerStarted` class, representing the scheduler start event.
23
+ An instance containing the scheduler start event data.
20
24
  """
21
- time: str = "" # The time when the scheduler started
22
- tasks: list = field(default_factory=list) # List of tasks scheduled at the time of start
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 {{command-class}}(BaseCommand):
5
+ class {{class_name}}(BaseCommand):
6
+ """
7
+ Command: {{signature}}
8
+ {{description}}
9
+ """
5
10
 
6
- # Command executed from the CLI, by convention starts with "app:".
7
- signature: str = "{{command-signature}}"
11
+ # Enable timestamps
12
+ timestamps: bool = True
8
13
 
9
- # Brief description of the command.
10
- description: str = "{{command-description}}"
14
+ # Command signature
15
+ signature: str = "{{signature}}"
11
16
 
12
- # List of command arguments and options.
13
- arguments: list[CLIArgument] = [
14
- # Example:
15
- # CLIArgument("--name", type=str, help="Example name", required=True)
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
- Main logic of the command.
21
- Override this method to implement the desired behavior.
22
- """
23
- pass
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.
@@ -1,4 +1,4 @@
1
- from orionis.console.dumper.dump import Debug
1
+ from orionis.console.dumper.debug import Debug
2
2
  from orionis.console.contracts.debug import IDebug
3
3
  from orionis.container.providers.service_provider import ServiceProvider
4
4
 
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.565.0"
8
+ VERSION = "0.567.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -1,6 +1,6 @@
1
1
  import os
2
2
  import sys
3
- from orionis.console.dumper.dump import Debug
3
+ from orionis.console.dumper.debug import Debug
4
4
  from orionis.test.exceptions import OrionisTestRuntimeError
5
5
  from orionis.test.contracts.dumper import ITestDumper
6
6
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.565.0
3
+ Version: 0.567.0
4
4
  Summary: Orionis Framework – Elegant, Fast, and Powerful.
5
5
  Home-page: https://github.com/orionis-framework/framework
6
6
  Author: Raul Mauricio Uñate Castro
@@ -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=03_nwYbdRXLSoDwVIJ9-ba-fSBwqNaCXvAk9pv3VdFI,8035
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=OW-a_YDDNPrenYT9z8Tv71VjyZ1aSzqzqhTBhTCZhGM,7698
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
@@ -35,35 +35,19 @@ orionis/console/contracts/schedule_event_listener.py,sha256=h06qsBxuEMD3KLSyu0JX
35
35
  orionis/console/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
36
  orionis/console/core/reactor.py,sha256=57EFQAA4lFY2yrYAzQIiQSRBTV2rLYXLEFsB0C8dxj4,41798
37
37
  orionis/console/dumper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
- orionis/console/dumper/dump.py,sha256=p8uflSXeDJDrVM9mZY4JMYEus73Z6TsLnQQtgP0QUak,22427
38
+ orionis/console/dumper/debug.py,sha256=p8uflSXeDJDrVM9mZY4JMYEus73Z6TsLnQQtgP0QUak,22427
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/all_jobs_removed.py,sha256=4_Foo_CW2mP7iazBJX90I_QJ-Qd_wYGpaJGHXzYDREw,728
43
- orionis/console/entities/command.py,sha256=OXoiE533U1JDbK6Mh-d6jlRmc4CCAPHeNNgBmmJFvpU,1360
44
- orionis/console/entities/event.py,sha256=teDa54mivEZvaRPfF9tP3Wd81jl9znObYhLyQn9yZ0s,3003
45
- orionis/console/entities/event_job.py,sha256=IBpD_FlCgj0WVeUROCzDdL4KUw1PGWQinahBP5MvqPo,2123
46
- orionis/console/entities/executor_added.py,sha256=qtV8dQKYxI_NcpDdOObuCemQy0eAihr0yBIkXewGCv0,702
47
- orionis/console/entities/executor_removed.py,sha256=B_Z_toclI46N5Wjo-ZUgFemxL_5UJcjkDod3kHWR1AQ,738
48
- orionis/console/entities/job_added.py,sha256=pYxXxhU3bEitUV1m_Np6ypzDPcvfTaFBcKwi67hHt_c,813
49
- orionis/console/entities/job_error.py,sha256=8BLyV_csom6MU3zcT7dzqfW4IjBv4BktDaVM-FsvJ5M,1231
50
- orionis/console/entities/job_event_data.py,sha256=pyqeLyel31ZyQwEMW92wvpWNL0Nd753m8KEmZXz4UcU,1470
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=kRBdSqt1eBPe3W8xDR5meQBXl3JuRcs75Q6kmfkyRKM,733
85
- orionis/console/stub/listener.stub,sha256=aFod_RZhoqo1W7l0S7fFBJ0-S46bQqwRAOr47ru8XYU,4846
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
@@ -232,7 +216,7 @@ orionis/foundation/providers/catch_provider.py,sha256=jLEFyHeyqCWgIJfqSfXrbRm9h6
232
216
  orionis/foundation/providers/cli_request_provider.py,sha256=hTBhBRr9TZhER3Lw7q2mNXRbG_BKl-WEuvV0R1bPjbs,1758
233
217
  orionis/foundation/providers/console_provider.py,sha256=p4XucSau5Nc8-u2xbVg2LAXDC9UXo6qhHD58u1g2T4Q,2963
234
218
  orionis/foundation/providers/directory_provider.py,sha256=17Euot2Eahe8DjK0zK2uC3c8gPua4eux3q-MKcomDYU,2091
235
- orionis/foundation/providers/dumper_provider.py,sha256=qusph9KFb4bBbtvdGu5S4TFwAftYVn8tESaff1QdBEY,3349
219
+ orionis/foundation/providers/dumper_provider.py,sha256=8y4sOOTfJR2GbIZT0GTEMr6ZWS3Wc2FJ8a3G0bhAJEY,3350
236
220
  orionis/foundation/providers/executor_provider.py,sha256=rJXsQrsfhyfHZOIF2Rk8HPSal7RGHKJa_YE5lQj4WX0,3471
237
221
  orionis/foundation/providers/inspirational_provider.py,sha256=uq2o0uLd5p6PR99uH4cJAcc6NnU6nIOwe0ZIdzZcF4Q,3726
238
222
  orionis/foundation/providers/logger_provider.py,sha256=rs8UpaD_vSp3qNli0u9A4eRum3q3F0KEM0V6yhcl2GU,3417
@@ -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=ucDz_eRVHDT5XLl1iSZnkACUzFtjosC-nmChuwUXU7s,4109
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
@@ -413,7 +397,7 @@ orionis/test/exceptions/persistence.py,sha256=8Oakaey35DpByLoGnfbwHxFKntxgWaGl49
413
397
  orionis/test/exceptions/runtime.py,sha256=h9gQ0pS8tJTmuXNG-GHky8tTqpdz-cNqkntOOlRXZJg,612
414
398
  orionis/test/exceptions/value.py,sha256=CoqYOkViU_RaKCMNpB82tgEsR3XhI1pw6YQ8sH8CJh4,588
415
399
  orionis/test/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
416
- orionis/test/output/dumper.py,sha256=I2uHjy-sokj3cJyO_bOwBUMvIVNoU3um1jb4-vGe39k,5907
400
+ orionis/test/output/dumper.py,sha256=qJDyVvl3MO0Uinr6z9TYYdDTqHNwwM0PcoDNNkTpAnA,5908
417
401
  orionis/test/output/printer.py,sha256=lW29hkrpPQLW0Q0AF39vBXRsQrUgYDru-SA2QyQ9Qqs,20820
418
402
  orionis/test/records/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
419
403
  orionis/test/records/logs.py,sha256=7XIdzDmQpb2HLUoAUWVj8UKiQDOnCkLD7ttro-Lv5UY,14223
@@ -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.565.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
440
- orionis-0.565.0.dist-info/METADATA,sha256=Rrl6vMafdelF9I2frX5dZCuAuVCrI3FUmYVMDdYGINk,4801
441
- orionis-0.565.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
442
- orionis-0.565.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
443
- orionis-0.565.0.dist-info/RECORD,,
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