orionis 0.511.0__py3-none-any.whl → 0.513.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 (47) hide show
  1. orionis/console/base/command.py +1 -1
  2. orionis/console/base/scheduler.py +1 -1
  3. orionis/console/base/scheduler_event_listener.py +136 -0
  4. orionis/console/commands/scheduler_work.py +37 -25
  5. orionis/console/contracts/event.py +3032 -9
  6. orionis/console/contracts/schedule.py +34 -0
  7. orionis/console/contracts/schedule_event_listener.py +320 -0
  8. orionis/console/contracts/scheduler.py +140 -0
  9. orionis/console/core/reactor.py +1 -1
  10. orionis/console/entities/all_jobs_removed.py +23 -0
  11. orionis/console/entities/executor_added.py +23 -0
  12. orionis/console/entities/executor_removed.py +25 -0
  13. orionis/console/entities/job_added.py +24 -0
  14. orionis/console/entities/job_error.py +35 -0
  15. orionis/console/entities/job_event_data.py +40 -0
  16. orionis/console/entities/job_executed.py +31 -0
  17. orionis/console/entities/job_max_instances.py +27 -0
  18. orionis/console/entities/job_missed.py +25 -0
  19. orionis/console/entities/job_modified.py +23 -0
  20. orionis/console/entities/job_pause.py +22 -0
  21. orionis/console/entities/job_removed.py +22 -0
  22. orionis/console/entities/job_resume.py +25 -0
  23. orionis/console/entities/job_store_added.py +24 -0
  24. orionis/console/entities/job_store_removed.py +25 -0
  25. orionis/console/entities/job_submitted.py +24 -0
  26. orionis/console/entities/scheduler_event_data.py +33 -0
  27. orionis/console/entities/scheduler_paused.py +17 -0
  28. orionis/console/entities/scheduler_resumed.py +24 -0
  29. orionis/console/entities/scheduler_shutdown.py +23 -0
  30. orionis/console/entities/scheduler_started.py +21 -0
  31. orionis/console/enums/listener.py +75 -0
  32. orionis/console/tasks/event.py +3703 -21
  33. orionis/console/tasks/schedule.py +701 -52
  34. orionis/foundation/application.py +1 -1
  35. orionis/metadata/framework.py +1 -1
  36. {orionis-0.511.0.dist-info → orionis-0.513.0.dist-info}/METADATA +1 -1
  37. {orionis-0.511.0.dist-info → orionis-0.513.0.dist-info}/RECORD +42 -22
  38. orionis/console/base/contracts/__init__.py +0 -0
  39. orionis/console/base/contracts/scheduler.py +0 -38
  40. orionis/console/contracts/listener.py +0 -132
  41. orionis/console/entities/listeners.py +0 -241
  42. orionis/console/tasks/exception_report.py +0 -94
  43. /orionis/console/{base/contracts → contracts}/command.py +0 -0
  44. {orionis-0.511.0.dist-info → orionis-0.513.0.dist-info}/WHEEL +0 -0
  45. {orionis-0.511.0.dist-info → orionis-0.513.0.dist-info}/licenses/LICENCE +0 -0
  46. {orionis-0.511.0.dist-info → orionis-0.513.0.dist-info}/top_level.txt +0 -0
  47. {orionis-0.511.0.dist-info → orionis-0.513.0.dist-info}/zip-safe +0 -0
@@ -2,7 +2,7 @@ import asyncio
2
2
  import time
3
3
  from pathlib import Path
4
4
  from typing import Any, List, Type
5
- from orionis.console.base.contracts.scheduler import IBaseScheduler
5
+ from orionis.console.contracts.scheduler import IBaseScheduler
6
6
  from orionis.console.base.scheduler import BaseScheduler
7
7
  from orionis.container.container import Container
8
8
  from orionis.container.contracts.service_provider import IServiceProvider
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.511.0"
8
+ VERSION = "0.513.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.511.0
3
+ Version: 0.513.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
@@ -7,28 +7,28 @@ orionis/console/args/argument.py,sha256=Is8Z8_kW4DvcK1nK1UU-sa6Pk0BeOdcRczCayW0Z
7
7
  orionis/console/args/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  orionis/console/args/enums/actions.py,sha256=S3T-vWS6DJSGtANrq3od3-90iYAjPvJwaOZ2V02y34c,1222
9
9
  orionis/console/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- orionis/console/base/command.py,sha256=nasVPyKEvuv8sDFEWXhHyBCWAmSLfPPm2XlKaYYt_pM,6642
11
- orionis/console/base/scheduler.py,sha256=lUHd83YhpsojxcCDme2e9Gcw6ebnsdRFgny4MKH5-rc,3380
12
- orionis/console/base/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- orionis/console/base/contracts/command.py,sha256=vmAJD0yMQ5-AD_s9_xCFEAl64sKk65z7U2E196dALQM,5760
14
- orionis/console/base/contracts/scheduler.py,sha256=y8q4qv6oxjnWSt9G0HP2IjogtWIASfJaMO5vkG22U1Q,1184
10
+ orionis/console/base/command.py,sha256=OM4xqVgpv_1RZVyVG8BzOHl1sP9FT5mPUwZjMil8IRg,6637
11
+ orionis/console/base/scheduler.py,sha256=5B1msuEwvEdaUIFzaLU8-QtfrbqduIkXfM7pubWhoZg,3375
12
+ orionis/console/base/scheduler_event_listener.py,sha256=m3p55Zz7HrMxGU3S3oMaMG58YPSRXPJUVCh4Ky7GFR8,4062
15
13
  orionis/console/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
14
  orionis/console/commands/cache.py,sha256=8DsYoRzSBLn0P9qkGVItRbo0R6snWBDBg0_Xa7tmVhs,2322
17
15
  orionis/console/commands/help.py,sha256=zfSw0pYaOnFN-_Ozdn4veBQDYMgSSDY10nPDCi-7tTY,3199
18
16
  orionis/console/commands/publisher.py,sha256=FUg-EUzK7LLXsla10ZUZro8V0Z5S-KjmsaSdRHSSGbA,21381
19
17
  orionis/console/commands/scheduler_list.py,sha256=OglphcIhdtWLkUccsINZt7AdWJtu9CE0awA7NkuXXvI,5179
20
- orionis/console/commands/scheduler_work.py,sha256=QcbVM2gpMV7jqNNpb6lXmDkEajjDso7s8qtjMZ70sOA,5068
18
+ orionis/console/commands/scheduler_work.py,sha256=JTB7mjA1KgJlE0yoWD6krhDPAu47tBZI01G00mTOReM,5930
21
19
  orionis/console/commands/test.py,sha256=-EmQwFwMBuby3OI9HwqMIwuJzd2CGbWbOqmwrR25sOE,2402
22
20
  orionis/console/commands/version.py,sha256=SUuNDJ40f2uq69OQUmPQXJKaa9Bm_iVRDPmBd7zc1Yc,3658
23
21
  orionis/console/commands/workflow.py,sha256=NYOmjTSvm2o6AE4h9LSTZMFSYPQreNmEJtronyOxaYk,2451
24
22
  orionis/console/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
- orionis/console/contracts/event.py,sha256=pxoxNjk31bt6yGvUFRTo_TI_SaZZar6iSIJARWR6KbM,5170
23
+ orionis/console/contracts/command.py,sha256=vmAJD0yMQ5-AD_s9_xCFEAl64sKk65z7U2E196dALQM,5760
24
+ orionis/console/contracts/event.py,sha256=zaOkbRNKpU6U_cIEFic84C3WIcD8kCIyX9hc50jN8N0,119797
26
25
  orionis/console/contracts/kernel.py,sha256=mh4LlhEYHh3FuGZZQ0GBhD6ZLa5YQvaNj2r01IIHI5Y,826
27
- orionis/console/contracts/listener.py,sha256=tXp2kTVEaqLRWZC6BY8xqj3JP0xpDDx4btPy3wnr8cM,3251
28
26
  orionis/console/contracts/reactor.py,sha256=Xeq7Zrw6WE5MV_XOQfiQEchAFbb6-0TjLpjWOxYW--g,4554
29
- orionis/console/contracts/schedule.py,sha256=eGjcOH7kgdf0fWDZRfOFUQsIx4E8G38ayX5JwpkpN8E,4977
27
+ orionis/console/contracts/schedule.py,sha256=gMd_CS-W8d_pOX6dBjcqtYRL_rXzTWdzeg-WyrI2g7g,6260
28
+ orionis/console/contracts/schedule_event_listener.py,sha256=0HSQ49O-Wzyn0P3rrfP2xsfSioIAaCv3n_pgEkhyY1o,12887
29
+ orionis/console/contracts/scheduler.py,sha256=90QoeoUGOLgLhzCKbWHpuAdWzmHiV1FQXrhzJajLMBA,4354
30
30
  orionis/console/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
- orionis/console/core/reactor.py,sha256=3i7-jn_HBwYfsNR8xpExt5Owi3nk9BfHnW7J7lUmb-4,30414
31
+ orionis/console/core/reactor.py,sha256=JlxNiqmyzAqiS21hxOMD5ELiDNPzmGHYDNrdlaMvYuI,30409
32
32
  orionis/console/dumper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  orionis/console/dumper/dump.py,sha256=CATERiQ6XuIrKQsDaWcVxzTtlAJI9qLJX44fQxEX8ws,22443
34
34
  orionis/console/dumper/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -38,11 +38,32 @@ orionis/console/dynamic/progress_bar.py,sha256=iK1kAf9vJIgk6BbdlGvlJkGc1m7Ck4euN
38
38
  orionis/console/dynamic/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  orionis/console/dynamic/contracts/progress_bar.py,sha256=NYebL2h-vg2t2H6IhJjuC37gglRkpT-MW71wbJtpLNg,1784
40
40
  orionis/console/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
- orionis/console/entities/listeners.py,sha256=I5JbbnwKz-ZQhQgS2r1wqfUTwagg8Os6qzfEY8FzVzg,5345
41
+ orionis/console/entities/all_jobs_removed.py,sha256=4_Foo_CW2mP7iazBJX90I_QJ-Qd_wYGpaJGHXzYDREw,728
42
+ orionis/console/entities/executor_added.py,sha256=qtV8dQKYxI_NcpDdOObuCemQy0eAihr0yBIkXewGCv0,702
43
+ orionis/console/entities/executor_removed.py,sha256=B_Z_toclI46N5Wjo-ZUgFemxL_5UJcjkDod3kHWR1AQ,738
44
+ orionis/console/entities/job_added.py,sha256=pYxXxhU3bEitUV1m_Np6ypzDPcvfTaFBcKwi67hHt_c,813
45
+ orionis/console/entities/job_error.py,sha256=8BLyV_csom6MU3zcT7dzqfW4IjBv4BktDaVM-FsvJ5M,1231
46
+ orionis/console/entities/job_event_data.py,sha256=pyqeLyel31ZyQwEMW92wvpWNL0Nd753m8KEmZXz4UcU,1470
47
+ orionis/console/entities/job_executed.py,sha256=mrjL_-w-BJzri1E3Xbl2cnPl6e6Ynanm4SFDijaEGfE,1002
48
+ orionis/console/entities/job_max_instances.py,sha256=MwU4P9xhLBwUyhPGDLxXrbtmKZ5BQP-9go4RGiPHW0o,956
49
+ orionis/console/entities/job_missed.py,sha256=sIHLGBy9NEGlR339pm6nbT4y4d1NWlerH_vNE5S-AYE,848
50
+ orionis/console/entities/job_modified.py,sha256=BQen8qNbqp6Cvxx3GM_WK4gUxLqmWyYObimXkfq1Pjs,756
51
+ orionis/console/entities/job_pause.py,sha256=oLN28duhcu6Nm-wVhsTY458_3ucPc9G3Wogit3i16Pk,693
52
+ orionis/console/entities/job_removed.py,sha256=8Xp12158cmulyhgmprZ043RDtTz88w5hTlcgueb7-0k,705
53
+ orionis/console/entities/job_resume.py,sha256=IwCkjO5zrPU59hruF264EQYrPDoSEp_j4QrwORRgkhc,814
54
+ orionis/console/entities/job_store_added.py,sha256=NoocJD3zSm7E8ZsUob8BdvKxveu9WdEqAtVPCzC8WII,735
55
+ orionis/console/entities/job_store_removed.py,sha256=wh53sf3Rkezo5hMQkWo-NToeCYwMOmp7BLa1ACVUnqo,740
56
+ orionis/console/entities/job_submitted.py,sha256=8ftGEOsDQxHYK2tunGA9_b-u581hPcvNnZ5NmmaMua0,731
42
57
  orionis/console/entities/request.py,sha256=Sm-6jMd95teUEdh_4VJWjsDbvfID3khHCOU_2OEEIv4,980
58
+ orionis/console/entities/scheduler_event_data.py,sha256=lqHxY05ikHnv_WoGXpE1MDpVzWb48fYh7db-XgeLD9I,1114
59
+ orionis/console/entities/scheduler_paused.py,sha256=AQS44-abq6mJPZwriQZYpf1gKDZyJ7_N_UkpJqpfynM,656
60
+ orionis/console/entities/scheduler_resumed.py,sha256=pUONb_84dKqYk9CrR-6vkPm4BTFilmGDDH3ZzM-oZHE,805
61
+ orionis/console/entities/scheduler_shutdown.py,sha256=tyXDaIZqsHhQyK9v0zWwkBYW9AYWl5R8aY8ZY7oTr-0,862
62
+ orionis/console/entities/scheduler_started.py,sha256=kqSASUZQyKpOyRB8gfk4FpzFLwx6eWiOIB6N_eZKOqc,825
43
63
  orionis/console/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
64
  orionis/console/enums/command.py,sha256=lCfVp2vnDojJN2gjdVxE_XU3mRjZZgOIxPfBVQYo9w4,1278
45
65
  orionis/console/enums/event.py,sha256=XRV7N14N5HHt-c0HqYhrbKv4n2P7ZOCcBT_3OAQzenU,1929
66
+ orionis/console/enums/listener.py,sha256=uii1CuAe6JPi6r3F-sEH_hVKl45HrWLm8l1PU1wX2Nk,2976
46
67
  orionis/console/exceptions/__init__.py,sha256=0qlHNuHMVZO87M-rP8lThUUyljRM1jSFNikaxSCjSbw,366
47
68
  orionis/console/exceptions/cli_exception.py,sha256=HsZ_vSeNiJWQ0gznVFNcIdhM0Bj_vkSRVBJs0wMjEKY,1141
48
69
  orionis/console/exceptions/cli_orionis_value_error.py,sha256=RQP0HRwxDG8hxFOT1kUoZ1Ab1CZ1KLoSIl5yqlmgG4M,1147
@@ -58,10 +79,9 @@ orionis/console/output/enums/__init__.py,sha256=LAaAxg-DpArCjf_jqZ0_9s3p8899gntD
58
79
  orionis/console/output/enums/styles.py,sha256=6a4oQCOBOKMh2ARdeq5GlIskJ3wjiylYmh66tUKKmpQ,4053
59
80
  orionis/console/request/cli_request.py,sha256=7-sgYmNUCipuHLVAwWLJiHv0cJCDmsM1Lu9s2D8RIII,1498
60
81
  orionis/console/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
61
- orionis/console/tasks/event.py,sha256=NcSmq3y4JWviXaSvRifmJs0nWqQQgHIDmzlWELrLeNU,12204
62
- orionis/console/tasks/exception_report.py,sha256=IN1PCQ08ZHs1sivUpzi2f9U9eW8ydZyb8GO6KiT56LY,3643
82
+ orionis/console/tasks/event.py,sha256=UhAIbSHueyykzny8SorxKbo8S-_TxP6jLhT-FuFyLL0,163405
63
83
  orionis/console/tasks/listener.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
64
- orionis/console/tasks/schedule.py,sha256=eF02JnKNBXeYFn4NlSrc8HhrgRlnBidXY1n2UxcOeBU,20240
84
+ orionis/console/tasks/schedule.py,sha256=l9hgDMPIbkJi1O1K2GupZD-HD1ygYRPLPdcEbdVFQWM,46877
65
85
  orionis/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
86
  orionis/container/container.py,sha256=aF_b6lTUpG4YCo9yFJEzsntTdIzgMMXFW5LyWqAJVBQ,87987
67
87
  orionis/container/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -103,7 +123,7 @@ orionis/failure/contracts/handler.py,sha256=4N9yMkMgdhtHbRGAyCtuTx3GmkPP74vhqdRL
103
123
  orionis/failure/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
104
124
  orionis/failure/entities/throwable.py,sha256=ogys062uhim5QMYU62ezlnumRAnYQlUf_vZvQY47S3U,1227
105
125
  orionis/foundation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
106
- orionis/foundation/application.py,sha256=4fkbnb2r7rfyn0_0JIX-wG-hRZzRVLQySWO7v4a_4e0,83797
126
+ orionis/foundation/application.py,sha256=GmfLnpWuhX_6d1gzUk1v7jy_R72XpLJdA-hEOrXQn_Q,83792
107
127
  orionis/foundation/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
108
128
  orionis/foundation/config/startup.py,sha256=vbzduprRCNyYeR2nnMaqc1uKXw6PTzAY2jVfXNQKN8I,9691
109
129
  orionis/foundation/config/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -219,7 +239,7 @@ orionis/foundation/providers/scheduler_provider.py,sha256=72SoixFog9IOE9Ve9Xcfw6
219
239
  orionis/foundation/providers/testing_provider.py,sha256=SrJRpdvcblx9WvX7x9Y3zc7OQfiTf7la0HAJrm2ESlE,3725
220
240
  orionis/foundation/providers/workers_provider.py,sha256=oa_2NIDH6UxZrtuGkkoo_zEoNIMGgJ46vg5CCgAm7wI,3926
221
241
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
222
- orionis/metadata/framework.py,sha256=-FVBuZWhGCE0qhqHluQa_6R5AuuwpTK0i8J6S08eo4c,4109
242
+ orionis/metadata/framework.py,sha256=6NoNocgXwGzH22ftuxlsTj_szulwLBhp3y1YnjY2DoA,4109
223
243
  orionis/metadata/package.py,sha256=k7Yriyp5aUcR-iR8SK2ec_lf0_Cyc-C7JczgXa-I67w,16039
224
244
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
225
245
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -395,7 +415,7 @@ orionis/test/validators/web_report.py,sha256=n9BfzOZz6aEiNTypXcwuWbFRG0OdHNSmCNu
395
415
  orionis/test/validators/workers.py,sha256=rWcdRexINNEmGaO7mnc1MKUxkHKxrTsVuHgbnIfJYgc,1206
396
416
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
397
417
  orionis/test/view/render.py,sha256=f-zNhtKSg9R5Njqujbg2l2amAs2-mRVESneLIkWOZjU,4082
398
- orionis-0.511.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
418
+ orionis-0.513.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
399
419
  tests/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
400
420
  tests/container/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
401
421
  tests/container/context/test_manager.py,sha256=wOwXpl9rHNfTTexa9GBKYMwK0_-KSQPbI-AEyGNkmAE,1356
@@ -541,8 +561,8 @@ tests/testing/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
541
561
  tests/testing/validators/test_testing_validators.py,sha256=WPo5GxTP6xE-Dw3X1vZoqOMpb6HhokjNSbgDsDRDvy4,16588
542
562
  tests/testing/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
543
563
  tests/testing/view/test_render.py,sha256=tnnMBwS0iKUIbogLvu-7Rii50G6Koddp3XT4wgdFEYM,1050
544
- orionis-0.511.0.dist-info/METADATA,sha256=xR0GtEZlhjWPhspPr6Zh4b_o_icahOx2f5UULaQoi_s,4801
545
- orionis-0.511.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
546
- orionis-0.511.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
547
- orionis-0.511.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
548
- orionis-0.511.0.dist-info/RECORD,,
564
+ orionis-0.513.0.dist-info/METADATA,sha256=LGeTVazZK9z_4kIpNC0uuJfJJdbdbBzguVb-YRJ1x5c,4801
565
+ orionis-0.513.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
566
+ orionis-0.513.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
567
+ orionis-0.513.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
568
+ orionis-0.513.0.dist-info/RECORD,,
File without changes
@@ -1,38 +0,0 @@
1
- from abc import ABC, abstractmethod
2
- from datetime import datetime
3
- from orionis.console.contracts.schedule import ISchedule
4
-
5
- class IBaseScheduler(ABC):
6
-
7
- # Pause Global Scheduler at a specific time
8
- PAUSE_AT: datetime = None
9
-
10
- # Resume Global Scheduler at a specific time
11
- RESUME_AT: datetime = None
12
-
13
- # Finalize Global Scheduler at a specific time
14
- FINALIZE_AT: datetime = None
15
-
16
- @abstractmethod
17
- def tasks(self, schedule: ISchedule):
18
- """
19
- Defines and registers scheduled tasks for the application.
20
-
21
- Parameters
22
- ----------
23
- schedule : ISchedule
24
- The schedule object used to define and register scheduled commands.
25
-
26
- Returns
27
- -------
28
- None
29
- This method does not return any value. It is intended to be overridden
30
- by subclasses to specify scheduled tasks.
31
-
32
- Notes
33
- -----
34
- This method should be implemented in subclasses to add specific tasks
35
- to the scheduler using the provided `schedule` object.
36
- """
37
- # This method should be overridden in subclasses to define scheduled tasks.
38
- pass
@@ -1,132 +0,0 @@
1
- from abc import ABC, abstractmethod
2
-
3
- class IEventListener(ABC):
4
- """
5
- Interface for event listeners that handle various stages of event processing.
6
- """
7
-
8
- @abstractmethod
9
- def before(self, event):
10
- """
11
- Hook method called before the main event handling logic.
12
-
13
- Parameters
14
- ----------
15
- event : object
16
- The event object that is about to be processed.
17
-
18
- Returns
19
- -------
20
- None
21
- This method does not return anything.
22
-
23
- Notes
24
- -----
25
- Override this method to implement logic that should run before the event is handled.
26
- """
27
- pass
28
-
29
- @abstractmethod
30
- def after(self, event):
31
- """
32
- Hook method called after an event is processed.
33
-
34
- Parameters
35
- ----------
36
- event : object
37
- The event object that was processed.
38
-
39
- Returns
40
- -------
41
- None
42
- This method does not return anything.
43
-
44
- Notes
45
- -----
46
- Override this method to implement logic that should run after the event is handled.
47
- """
48
- pass
49
-
50
- @abstractmethod
51
- def onSuccess(self, event):
52
- """
53
- Handle actions to be performed when an event is successfully processed.
54
-
55
- Parameters
56
- ----------
57
- event : object
58
- The event object that triggered the success callback.
59
-
60
- Returns
61
- -------
62
- None
63
- This method does not return anything.
64
-
65
- Notes
66
- -----
67
- Override this method to define actions on successful event processing.
68
- """
69
- pass
70
-
71
- @abstractmethod
72
- def onFailure(self, event):
73
- """
74
- Handle the event when a failure occurs during event processing.
75
-
76
- Parameters
77
- ----------
78
- event : object
79
- The event object containing information about the failure.
80
-
81
- Returns
82
- -------
83
- None
84
- This method does not return anything.
85
-
86
- Notes
87
- -----
88
- Override this method to define actions when event processing fails.
89
- """
90
- pass
91
-
92
- @abstractmethod
93
- def onMissed(self, event):
94
- """
95
- Handle the event when an expected event is missed.
96
-
97
- Parameters
98
- ----------
99
- event : object
100
- The event object that was missed.
101
-
102
- Returns
103
- -------
104
- None
105
- This method does not return anything.
106
-
107
- Notes
108
- -----
109
- Override this method to define actions when an event is missed.
110
- """
111
- pass
112
-
113
- @abstractmethod
114
- def onMaxInstances(self, event):
115
- """
116
- Handles the event triggered when the maximum number of instances is reached.
117
-
118
- Parameters
119
- ----------
120
- event : object
121
- The event object containing information about the max instances event.
122
-
123
- Returns
124
- -------
125
- None
126
- This method does not return anything.
127
-
128
- Notes
129
- -----
130
- Override this method to define actions when the maximum number of instances is reached.
131
- """
132
- pass
@@ -1,241 +0,0 @@
1
- from dataclasses import dataclass
2
- from datetime import datetime
3
- from typing import Any
4
-
5
- # ==============================================================
6
- # Base Events
7
- # ==============================================================
8
-
9
- @dataclass
10
- class SchedulerEventData:
11
- """
12
- Base class for scheduler-related events.
13
-
14
- Attributes
15
- ----------
16
- code : int
17
- The numeric event code indicating the event type.
18
- """
19
- code: int
20
-
21
-
22
- @dataclass
23
- class JobEventData(SchedulerEventData):
24
- """
25
- Base class for job-related events.
26
-
27
- Attributes
28
- ----------
29
- code : int
30
- The numeric event code indicating the event type.
31
- job_id : str
32
- The identifier of the job.
33
- jobstore : str
34
- The name of the job store where the job is located.
35
- """
36
- job_id: str
37
- jobstore: str
38
-
39
-
40
- # ==============================================================
41
- # Scheduler Lifecycle Events
42
- # ==============================================================
43
-
44
- @dataclass
45
- class SchedulerStarted(SchedulerEventData):
46
- """
47
- Event triggered when the scheduler starts running.
48
- """
49
-
50
-
51
- @dataclass
52
- class SchedulerShutdown(SchedulerEventData):
53
- """
54
- Event triggered when the scheduler shuts down.
55
- """
56
-
57
-
58
- @dataclass
59
- class SchedulerPaused(SchedulerEventData):
60
- """
61
- Event triggered when the scheduler is paused.
62
- """
63
-
64
-
65
- @dataclass
66
- class SchedulerResumed(SchedulerEventData):
67
- """
68
- Event triggered when the scheduler is resumed.
69
- """
70
-
71
-
72
- # ==============================================================
73
- # Executor and JobStore Events
74
- # ==============================================================
75
-
76
- @dataclass
77
- class ExecutorAdded(SchedulerEventData):
78
- """
79
- Event triggered when an executor is added.
80
-
81
- Attributes
82
- ----------
83
- alias : str
84
- The alias of the added executor.
85
- """
86
- alias: str
87
-
88
-
89
- @dataclass
90
- class ExecutorRemoved(SchedulerEventData):
91
- """
92
- Event triggered when an executor is removed.
93
-
94
- Attributes
95
- ----------
96
- alias : str
97
- The alias of the removed executor.
98
- """
99
- alias: str
100
-
101
-
102
- @dataclass
103
- class JobstoreAdded(SchedulerEventData):
104
- """
105
- Event triggered when a job store is added.
106
-
107
- Attributes
108
- ----------
109
- alias : str
110
- The alias of the added job store.
111
- """
112
- alias: str
113
-
114
-
115
- @dataclass
116
- class JobstoreRemoved(SchedulerEventData):
117
- """
118
- Event triggered when a job store is removed.
119
-
120
- Attributes
121
- ----------
122
- alias : str
123
- The alias of the removed job store.
124
- """
125
- alias: str
126
-
127
-
128
- @dataclass
129
- class AllJobsRemoved(SchedulerEventData):
130
- """
131
- Event triggered when all jobs are removed from a job store.
132
-
133
- Attributes
134
- ----------
135
- jobstore : str
136
- The alias of the job store from which jobs were removed.
137
- """
138
- jobstore: str
139
-
140
-
141
- # ==============================================================
142
- # Job Management Events
143
- # ==============================================================
144
-
145
- @dataclass
146
- class JobAdded(JobEventData):
147
- """
148
- Event triggered when a job is added to a job store.
149
- """
150
-
151
-
152
- @dataclass
153
- class JobRemoved(JobEventData):
154
- """
155
- Event triggered when a job is removed from a job store.
156
- """
157
-
158
-
159
- @dataclass
160
- class JobModified(JobEventData):
161
- """
162
- Event triggered when a job is modified in a job store.
163
- """
164
-
165
-
166
- @dataclass
167
- class JobSubmitted(JobEventData):
168
- """
169
- Event triggered when a job is submitted to an executor.
170
-
171
- Attributes
172
- ----------
173
- run_time : datetime
174
- The datetime when the job was scheduled to run.
175
- """
176
- run_time: datetime
177
-
178
-
179
- @dataclass
180
- class JobMaxInstances(JobEventData):
181
- """
182
- Event triggered when a job exceeds its maximum allowed instances.
183
-
184
- Attributes
185
- ----------
186
- run_time : datetime
187
- The datetime when the job was scheduled to run.
188
- """
189
- run_time: datetime
190
-
191
-
192
- # ==============================================================
193
- # Job Execution Events
194
- # ==============================================================
195
-
196
- @dataclass
197
- class JobExecuted(JobEventData):
198
- """
199
- Event triggered when a job finishes successfully.
200
-
201
- Attributes
202
- ----------
203
- scheduled_run_time : datetime
204
- The datetime when the job was scheduled to run.
205
- retval : Any
206
- The return value of the job function.
207
- """
208
- scheduled_run_time: datetime
209
- retval: Any
210
-
211
-
212
- @dataclass
213
- class JobError(JobEventData):
214
- """
215
- Event triggered when a job raises an exception during execution.
216
-
217
- Attributes
218
- ----------
219
- scheduled_run_time : datetime
220
- The datetime when the job was scheduled to run.
221
- exception : Exception
222
- The exception raised by the job.
223
- traceback : str
224
- The traceback of the exception.
225
- """
226
- scheduled_run_time: datetime
227
- exception: Exception
228
- traceback: str
229
-
230
-
231
- @dataclass
232
- class JobMissed(JobEventData):
233
- """
234
- Event triggered when a job run is missed due to scheduler constraints.
235
-
236
- Attributes
237
- ----------
238
- scheduled_run_time : datetime
239
- The datetime when the job was originally scheduled to run.
240
- """
241
- scheduled_run_time: datetime
@@ -1,94 +0,0 @@
1
- from rich.console import Console
2
- from rich.panel import Panel
3
- from rich.text import Text
4
- from rich.traceback import Traceback
5
-
6
- class ScheduleErrorReporter:
7
- """Handles and displays errors and warnings with rich formatting using the Rich library.
8
-
9
- This class provides methods to output formatted error and warning messages to the console,
10
- enhancing readability and debugging using the Rich library's features.
11
-
12
- Attributes
13
- ----------
14
- console : Console
15
- Rich Console object used for rendering formatted output to the terminal.
16
- """
17
-
18
- def __init__(self):
19
- """
20
- Initialize the ErrorReporter instance.
21
-
22
- This constructor creates a new Console object from the Rich library and assigns it to the 'console' attribute,
23
- which is used for rendering formatted output to the terminal.
24
-
25
- Returns
26
- -------
27
- None
28
- This constructor does not return any value.
29
- """
30
- self.console = Console()
31
-
32
- def reportException(self, job_id: str, exception: Exception, traceback: str = None):
33
- """
34
- Display a formatted error message for an exception that occurred during a job execution.
35
-
36
- This method prints a visually enhanced error panel to the console, including the job identifier and the exception message.
37
- If a traceback string is provided, it is rendered below the error panel for detailed debugging information.
38
-
39
- Parameters
40
- ----------
41
- job_id : str
42
- The identifier of the job where the exception occurred.
43
- exception : Exception
44
- The exception instance that was raised.
45
- traceback : str, optional
46
- The string representation of the traceback. If provided, it will be displayed after the error message.
47
-
48
- Returns
49
- -------
50
- None
51
- This method does not return any value. It outputs formatted error information to the console.
52
- """
53
- title = f"[bold red]Job Execution Error[/bold red]"
54
- message = Text.assemble(
55
- ("An exception occurred during the execution of job ", "white"),
56
- (f"'{job_id}'", "bold cyan"),
57
- (":\n", "white"),
58
- (f"{type(exception).__name__}: {exception}", "red")
59
- )
60
-
61
- self.console.print(Panel(message, title=title, border_style="red", padding=(1, 2)))
62
- if traceback:
63
- tb = Traceback.from_string(traceback)
64
- self.console.print(tb)
65
- self.console.line()
66
-
67
-
68
- def reportMissed(self, job_id: str, scheduled_time):
69
- """
70
- Display a formatted warning message for a missed job execution.
71
-
72
- This method prints a warning panel to the console, indicating that a scheduled job was missed and showing its scheduled time.
73
-
74
- Parameters
75
- ----------
76
- job_id : str
77
- The identifier of the missed job.
78
- scheduled_time : Any
79
- The time the job was scheduled to run.
80
-
81
- Returns
82
- -------
83
- None
84
- This method does not return any value. It outputs a warning message to the console.
85
- """
86
- title = f"[bold yellow]Missed Scheduled Job[/bold yellow]"
87
- msg = Text.assemble(
88
- ("The scheduled job ", "white"),
89
- (f"'{job_id}'", "bold cyan"),
90
- (" was not executed as planned.\nScheduled time: ", "white"),
91
- (f"{scheduled_time}", "bold green")
92
- )
93
- self.console.print(Panel(msg, title=title, border_style="yellow", padding=(1, 2)))
94
- self.console.line()