orionis 0.490.0__py3-none-any.whl → 0.492.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.
@@ -82,6 +82,16 @@ class ScheduleWorkCommand(BaseCommand):
82
82
  # Register scheduled tasks using the Scheduler's tasks method
83
83
  Scheduler.tasks(schedule_serice)
84
84
 
85
+ # Retrieve the list of scheduled jobs/events
86
+ list_tasks = schedule_serice.events()
87
+
88
+ # Display a message if no scheduled jobs are found
89
+ if not list_tasks:
90
+ console.line()
91
+ console.print(Panel("No scheduled jobs found.", border_style="green"))
92
+ console.line()
93
+ return True
94
+
85
95
  # Display a start message for the scheduler worker
86
96
  console.line()
87
97
  start_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
File without changes
@@ -0,0 +1,27 @@
1
+ from orionis.console.base.scheduler import BaseScheduler
2
+ from orionis.console.contracts.schedule import ISchedule
3
+
4
+ class Scheduler(BaseScheduler):
5
+
6
+ def tasks(self, schedule: ISchedule):
7
+ """
8
+ Defines and registers scheduled tasks for the application.
9
+
10
+ Parameters
11
+ ----------
12
+ schedule : ISchedule
13
+ The schedule object used to define and register scheduled commands.
14
+
15
+ Returns
16
+ -------
17
+ None
18
+ This method does not return any value. It is intended to be overridden
19
+ by subclasses to specify scheduled tasks.
20
+
21
+ Notes
22
+ -----
23
+ Subclasses should implement this method to add specific tasks to the scheduler
24
+ using the provided `schedule` object. This method enforces that each subclass
25
+ defines its own scheduled tasks.
26
+ """
27
+ pass
orionis/failure/catch.py CHANGED
@@ -7,6 +7,11 @@ from orionis.services.log.contracts.log_service import ILogger
7
7
 
8
8
  class Catch(ICatch):
9
9
 
10
+ # Exceptions that should not be caught by the handler
11
+ dont_cathc: List[type[BaseException]] = [
12
+ #...
13
+ ]
14
+
10
15
  def __init__(self, app: IApplication) -> None:
11
16
  """
12
17
  Initializes the Catch handler with application services for console output and logging.
@@ -101,6 +106,10 @@ class Catch(ICatch):
101
106
  # Convert the exception into a structured Throwable object
102
107
  throwable = self.destructureException(exception)
103
108
 
109
+ # If the exception type is in the list of exceptions passed to the handler
110
+ if hasattr(self, 'dont_cathc') and throwable.classtype in self.dont_cathc:
111
+ return
112
+
104
113
  # Log the exception details
105
114
  self.logger.error(f"[{throwable.classtype.__name__}] {throwable.message}")
106
115
 
@@ -141,6 +150,10 @@ class Catch(ICatch):
141
150
  # Convert the exception into a structured Throwable object
142
151
  throwable = self.destructureException(exception)
143
152
 
153
+ # If the exception type is in the list of exceptions passed to the handler
154
+ if hasattr(self, 'dont_cathc') and throwable.classtype in self.dont_cathc:
155
+ return
156
+
144
157
  # Log the CLI error message with arguments
145
158
  self.logger.error(f"CLI Error: {throwable.message} (Args: {args})")
146
159
 
@@ -450,7 +450,8 @@ class Application(Container, IApplication):
450
450
 
451
451
  # Check if a scheduler has been set
452
452
  if self.__scheduler is None:
453
- raise OrionisRuntimeError("No scheduler has been set for this application.")
453
+ from orionis.console.default.scheduler import Scheduler as DefaultScheduler
454
+ return DefaultScheduler()
454
455
 
455
456
  # Return the registered scheduler instance
456
457
  return self.__scheduler()
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.490.0"
8
+ VERSION = "0.492.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
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.490.0
3
+ Version: 0.492.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
@@ -17,7 +17,7 @@ orionis/console/commands/cache.py,sha256=8DsYoRzSBLn0P9qkGVItRbo0R6snWBDBg0_Xa7t
17
17
  orionis/console/commands/help.py,sha256=zfSw0pYaOnFN-_Ozdn4veBQDYMgSSDY10nPDCi-7tTY,3199
18
18
  orionis/console/commands/publisher.py,sha256=FUg-EUzK7LLXsla10ZUZro8V0Z5S-KjmsaSdRHSSGbA,21381
19
19
  orionis/console/commands/scheduler_list.py,sha256=OglphcIhdtWLkUccsINZt7AdWJtu9CE0awA7NkuXXvI,5179
20
- orionis/console/commands/scheduler_work.py,sha256=EgoypatVwzpHR-Sm1C4vC2g9EMqNBV1Wd1DHMJtHCrc,4678
20
+ orionis/console/commands/scheduler_work.py,sha256=QcbVM2gpMV7jqNNpb6lXmDkEajjDso7s8qtjMZ70sOA,5068
21
21
  orionis/console/commands/test.py,sha256=-EmQwFwMBuby3OI9HwqMIwuJzd2CGbWbOqmwrR25sOE,2402
22
22
  orionis/console/commands/version.py,sha256=SUuNDJ40f2uq69OQUmPQXJKaa9Bm_iVRDPmBd7zc1Yc,3658
23
23
  orionis/console/commands/workflow.py,sha256=NYOmjTSvm2o6AE4h9LSTZMFSYPQreNmEJtronyOxaYk,2451
@@ -29,6 +29,8 @@ orionis/console/contracts/reactor.py,sha256=Xeq7Zrw6WE5MV_XOQfiQEchAFbb6-0TjLpjW
29
29
  orionis/console/contracts/schedule.py,sha256=eGjcOH7kgdf0fWDZRfOFUQsIx4E8G38ayX5JwpkpN8E,4977
30
30
  orionis/console/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
31
  orionis/console/core/reactor.py,sha256=Lwk6u0lO1n-E74Kyiw0xYwFMbQoJn7uszGoN9RNHS-c,30597
32
+ orionis/console/default/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
+ orionis/console/default/scheduler.py,sha256=5ZEKqc4BnHg4CAiJ_XJcy9WcJvmunmP3BHcUhf77asg,893
32
34
  orionis/console/dumper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
35
  orionis/console/dumper/dump.py,sha256=CATERiQ6XuIrKQsDaWcVxzTtlAJI9qLJX44fQxEX8ws,22443
34
36
  orionis/console/dumper/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -93,13 +95,13 @@ orionis/container/validators/is_subclass.py,sha256=4sBaGLoRs8nUhuWjlP0VJqyTwVHYq
93
95
  orionis/container/validators/is_valid_alias.py,sha256=4uAYcq8xov7jZbXnpKpjNkxcZtlTNnL5RRctVPMwJes,1424
94
96
  orionis/container/validators/lifetime.py,sha256=IQ43fDNrxYHMlZH2zlYDJnlkLO_eS4U7Fs3UJgQBidI,1844
95
97
  orionis/failure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
96
- orionis/failure/catch.py,sha256=7pCnsuZbn1guLvpI0HzJbB6NL2yQcM9w5qiRwdzUVwA,5624
98
+ orionis/failure/catch.py,sha256=6Ijp7GDTJ3UfTFa42E_yMt7PAYnXSG8zHRkE-IBRxHU,6133
97
99
  orionis/failure/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
98
100
  orionis/failure/contracts/catch.py,sha256=sdtjhq6ToXrtdKR0Bw9YYUqofvm-FGULPnz4dZVddWQ,2844
99
101
  orionis/failure/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
100
102
  orionis/failure/entities/throwable.py,sha256=ogys062uhim5QMYU62ezlnumRAnYQlUf_vZvQY47S3U,1227
101
103
  orionis/foundation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
102
- orionis/foundation/application.py,sha256=kQxq9oadgqR1Fw5gTTfQIaclzsYT7a_cfv759z7Q8J8,78587
104
+ orionis/foundation/application.py,sha256=-v9VCFdYyLhpeaeEgHkSeZH4QjTVVFM5l4B1tQGGgsA,78625
103
105
  orionis/foundation/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
104
106
  orionis/foundation/config/startup.py,sha256=vbzduprRCNyYeR2nnMaqc1uKXw6PTzAY2jVfXNQKN8I,9691
105
107
  orionis/foundation/config/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -214,7 +216,7 @@ orionis/foundation/providers/scheduler_provider.py,sha256=72SoixFog9IOE9Ve9Xcfw6
214
216
  orionis/foundation/providers/testing_provider.py,sha256=SrJRpdvcblx9WvX7x9Y3zc7OQfiTf7la0HAJrm2ESlE,3725
215
217
  orionis/foundation/providers/workers_provider.py,sha256=oa_2NIDH6UxZrtuGkkoo_zEoNIMGgJ46vg5CCgAm7wI,3926
216
218
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
217
- orionis/metadata/framework.py,sha256=PavAxvH_qjp4eIP7zr_1Q2dwM4DhqjHxviy7oOlGPpo,4109
219
+ orionis/metadata/framework.py,sha256=tZjkExU-g76gkmbtzvK3VCB5TJEKdHJLvFcM4SL8D1s,4109
218
220
  orionis/metadata/package.py,sha256=k7Yriyp5aUcR-iR8SK2ec_lf0_Cyc-C7JczgXa-I67w,16039
219
221
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
220
222
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -388,7 +390,7 @@ orionis/test/validators/web_report.py,sha256=n9BfzOZz6aEiNTypXcwuWbFRG0OdHNSmCNu
388
390
  orionis/test/validators/workers.py,sha256=rWcdRexINNEmGaO7mnc1MKUxkHKxrTsVuHgbnIfJYgc,1206
389
391
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
390
392
  orionis/test/view/render.py,sha256=f-zNhtKSg9R5Njqujbg2l2amAs2-mRVESneLIkWOZjU,4082
391
- orionis-0.490.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
393
+ orionis-0.492.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
392
394
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
393
395
  tests/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
394
396
  tests/container/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -535,8 +537,8 @@ tests/testing/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
535
537
  tests/testing/validators/test_testing_validators.py,sha256=WPo5GxTP6xE-Dw3X1vZoqOMpb6HhokjNSbgDsDRDvy4,16588
536
538
  tests/testing/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
537
539
  tests/testing/view/test_render.py,sha256=tnnMBwS0iKUIbogLvu-7Rii50G6Koddp3XT4wgdFEYM,1050
538
- orionis-0.490.0.dist-info/METADATA,sha256=3SiRXUtsN5xqmfmUPbDP6naYme3HOBPJvx04oRcnCtw,4801
539
- orionis-0.490.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
540
- orionis-0.490.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
541
- orionis-0.490.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
542
- orionis-0.490.0.dist-info/RECORD,,
540
+ orionis-0.492.0.dist-info/METADATA,sha256=sXzVQKNb3NcgGIQ7CYANg1UV56ki4dzvonYgAjszsdw,4801
541
+ orionis-0.492.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
542
+ orionis-0.492.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
543
+ orionis-0.492.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
544
+ orionis-0.492.0.dist-info/RECORD,,