orionis 0.476.0__py3-none-any.whl → 0.478.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.
@@ -362,7 +362,9 @@ class Scheduler():
362
362
 
363
363
  def everySeconds(
364
364
  self,
365
- seconds: int
365
+ seconds: int,
366
+ start_date: Optional[datetime] = None,
367
+ end_date: Optional[datetime] = None
366
368
  ) -> 'Scheduler':
367
369
  """
368
370
  Schedule a command to run at regular intervals in seconds.
@@ -393,13 +395,21 @@ class Scheduler():
393
395
  if not isinstance(seconds, int) or seconds <= 0:
394
396
  raise CLIOrionisValueError("The interval must be a positive integer.")
395
397
 
398
+ # If start_date is provided, ensure it is a datetime instance.
399
+ if start_date is not None and not isinstance(start_date, datetime):
400
+ raise CLIOrionisValueError("Start date must be a datetime instance.")
401
+
402
+ # If end_date is provided, ensure it is a datetime instance.
403
+ if end_date is not None and not isinstance(end_date, datetime):
404
+ raise CLIOrionisValueError("End date must be a datetime instance.")
405
+
396
406
  # Store the interval in the jobs dictionary.
397
407
  self.__jobs[self.__command] = Task(
398
408
  signature=self.__command,
399
409
  args=self.__args,
400
410
  purpose=self.__purpose,
401
411
  trigger='every_seconds',
402
- details=f"Interval: {seconds} seconds"
412
+ details=f"Interval: {seconds} seconds, Start Date: {start_date.strftime('%Y-%m-%d %H:%M:%S') if start_date else 'None'}, End Date: {end_date.strftime('%Y-%m-%d %H:%M:%S') if end_date else 'None'}"
403
413
  )
404
414
 
405
415
  # Add the job to the scheduler with an interval trigger.
@@ -409,7 +419,9 @@ class Scheduler():
409
419
  args
410
420
  ),
411
421
  trigger=IntervalTrigger(
412
- seconds=seconds
422
+ seconds=seconds,
423
+ start_date=start_date,
424
+ end_date=end_date
413
425
  ),
414
426
  id=self.__command,
415
427
  name=self.__command,
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.476.0"
8
+ VERSION = "0.478.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -0,0 +1,21 @@
1
+ from orionis.container.facades.facade import Facade
2
+
3
+ class PerformanceCounter(Facade):
4
+
5
+ @classmethod
6
+ def getFacadeAccessor(cls):
7
+ """
8
+ Get the registered name of the component in the service container.
9
+
10
+ This method provides the binding key that the service container uses to
11
+ resolve the workers service implementation. It serves as the bridge between
12
+ the facade and the underlying service registration.
13
+
14
+ Returns
15
+ -------
16
+ str
17
+ The service container binding key 'x-orionis.support.performance.counter'
18
+ that identifies the workers service implementation.
19
+ """
20
+
21
+ return "x-orionis.support.performance.counter"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.476.0
3
+ Version: 0.478.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
@@ -48,7 +48,7 @@ orionis/console/output/contracts/executor.py,sha256=7l3kwnvv6GlH9EYk0v94YE1olex_
48
48
  orionis/console/output/enums/__init__.py,sha256=LAaAxg-DpArCjf_jqZ0_9s3p8899gntDYkSU_ppTdC8,66
49
49
  orionis/console/output/enums/styles.py,sha256=6a4oQCOBOKMh2ARdeq5GlIskJ3wjiylYmh66tUKKmpQ,4053
50
50
  orionis/console/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
- orionis/console/tasks/schedule.py,sha256=DFso4ia8G3me2H1tOX366dXhucIKd-LRH8c-kfJ8fhA,21395
51
+ orionis/console/tasks/schedule.py,sha256=qlll0aagyOzAa3EmluycrSM9zvxVqSMgP5bUOGm1zZA,22215
52
52
  orionis/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
53
  orionis/container/container.py,sha256=p7kJ-hwnDattTWCArt0ypol4bW3M334hIZ2FAQhID-w,87570
54
54
  orionis/container/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -194,7 +194,7 @@ orionis/foundation/providers/reactor_provider.py,sha256=P0KQcp4AFKTrD6BStGfCTqhG
194
194
  orionis/foundation/providers/testing_provider.py,sha256=SrJRpdvcblx9WvX7x9Y3zc7OQfiTf7la0HAJrm2ESlE,3725
195
195
  orionis/foundation/providers/workers_provider.py,sha256=oa_2NIDH6UxZrtuGkkoo_zEoNIMGgJ46vg5CCgAm7wI,3926
196
196
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
197
- orionis/metadata/framework.py,sha256=gRPC1m0TsT2mlxRIwLsH98soldLLTqKMGuFn_WPQlw4,4109
197
+ orionis/metadata/framework.py,sha256=_RmAaDI2nx_VXNowa0s5vscpNmtmWyTr5s7UiHMkqpg,4109
198
198
  orionis/metadata/package.py,sha256=k7Yriyp5aUcR-iR8SK2ec_lf0_Cyc-C7JczgXa-I67w,16039
199
199
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
200
200
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -291,6 +291,7 @@ orionis/support/facades/dumper.py,sha256=qQPoMbkXExv6UaByoDCyJA-gt5SA1oQtym2Twpi
291
291
  orionis/support/facades/executor.py,sha256=fRBQ447WpL2T42Ys02k_DJNqukFFk8-bbNFz4GEbRfI,931
292
292
  orionis/support/facades/inspire.py,sha256=n7TFhxneqUtEJYQSrOdmNq9XQzhFMMsIAfdwnBWR1hA,841
293
293
  orionis/support/facades/logger.py,sha256=Ncrd_bcggEOnWfLmvGjYTnFgO_Hop2iO9di1oWqH0Ow,824
294
+ orionis/support/facades/performance_counter.py,sha256=NGSYbGREfOfjsXnLcJ2J9sLVRuOLZwPjJsqYP7-6egg,733
294
295
  orionis/support/facades/progress_bar.py,sha256=eTxfGIAfdkrXkycvdQBddn9E4MIlbCLOU7TDO2-7cgU,717
295
296
  orionis/support/facades/reactor.py,sha256=CJwyUU-MC1LqwiHji7f7gSm2XAs8_DdhbOXmTylNt70,742
296
297
  orionis/support/facades/testing.py,sha256=5tzFIMSe1gxLcs7dcueUnAdTJ977czd2sNK1RtUjSUM,737
@@ -364,7 +365,7 @@ orionis/test/validators/web_report.py,sha256=n9BfzOZz6aEiNTypXcwuWbFRG0OdHNSmCNu
364
365
  orionis/test/validators/workers.py,sha256=rWcdRexINNEmGaO7mnc1MKUxkHKxrTsVuHgbnIfJYgc,1206
365
366
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
366
367
  orionis/test/view/render.py,sha256=f-zNhtKSg9R5Njqujbg2l2amAs2-mRVESneLIkWOZjU,4082
367
- orionis-0.476.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
368
+ orionis-0.478.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
368
369
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
369
370
  tests/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
370
371
  tests/container/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -511,8 +512,8 @@ tests/testing/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
511
512
  tests/testing/validators/test_testing_validators.py,sha256=WPo5GxTP6xE-Dw3X1vZoqOMpb6HhokjNSbgDsDRDvy4,16588
512
513
  tests/testing/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
513
514
  tests/testing/view/test_render.py,sha256=tnnMBwS0iKUIbogLvu-7Rii50G6Koddp3XT4wgdFEYM,1050
514
- orionis-0.476.0.dist-info/METADATA,sha256=JiWk4nLrJ8sXSpioU4N90qBnNS8z5MjfihB57lQVLfs,4801
515
- orionis-0.476.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
516
- orionis-0.476.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
517
- orionis-0.476.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
518
- orionis-0.476.0.dist-info/RECORD,,
515
+ orionis-0.478.0.dist-info/METADATA,sha256=LI8ito8saDpADOaQ1uBmcGO17dm5DoY7s_Ahep3kECk,4801
516
+ orionis-0.478.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
517
+ orionis-0.478.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
518
+ orionis-0.478.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
519
+ orionis-0.478.0.dist-info/RECORD,,