runtimepy 5.9.1__py3-none-any.whl → 5.9.2__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.
runtimepy/__init__.py CHANGED
@@ -1,7 +1,7 @@
1
1
  # =====================================
2
2
  # generator=datazen
3
3
  # version=3.1.4
4
- # hash=47ca3ea38190cecfff6abaeec5ce0939
4
+ # hash=ba2f544d63fad56dd7605cf937fe52d8
5
5
  # =====================================
6
6
 
7
7
  """
@@ -10,7 +10,7 @@ Useful defaults and other package metadata.
10
10
 
11
11
  DESCRIPTION = "A framework for implementing Python services."
12
12
  PKG_NAME = "runtimepy"
13
- VERSION = "5.9.1"
13
+ VERSION = "5.9.2"
14
14
 
15
15
  # runtimepy-specific content.
16
16
  METRICS_NAME = "metrics"
@@ -32,6 +32,7 @@ from runtimepy.mixins.logging import LoggerMixinLevelControl
32
32
  from runtimepy.primitives import Bool as _Bool
33
33
  from runtimepy.primitives import Double as _Double
34
34
  from runtimepy.primitives import Float as _Float
35
+ from runtimepy.primitives.evaluation import EvalResult as _EvalResult
35
36
  from runtimepy.ui.controls import Controlslike
36
37
 
37
38
 
@@ -136,6 +137,12 @@ class PeriodicTask(
136
137
  self._enabled.clear()
137
138
  return result
138
139
 
140
+ async def wait_for_disable(
141
+ self, timeout: float, value: bool = False
142
+ ) -> _EvalResult:
143
+ """Wait for a task to become disabled."""
144
+ return await self._enabled.wait_for_state(value, timeout)
145
+
139
146
  async def wait_iterations(self, timeout: float, count: int = 1) -> bool:
140
147
  """Wait for a task to complete a certain number of iterations."""
141
148
 
@@ -179,7 +186,7 @@ class PeriodicTask(
179
186
 
180
187
  # Check this synchronously. This may not be suitable for tasks
181
188
  # with long periods.
182
- if stop_sig is not None:
189
+ if self._enabled and stop_sig is not None:
183
190
  self._enabled.raw.value = not stop_sig.is_set()
184
191
 
185
192
  if self._enabled:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: runtimepy
3
- Version: 5.9.1
3
+ Version: 5.9.2
4
4
  Summary: A framework for implementing Python services.
5
5
  Home-page: https://github.com/vkottler/runtimepy
6
6
  Author: Vaughn Kottler
@@ -17,11 +17,11 @@ Classifier: License :: OSI Approved :: MIT License
17
17
  Requires-Python: >=3.12
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
- Requires-Dist: svgen>=0.7.4
21
- Requires-Dist: websockets
22
- Requires-Dist: psutil
23
20
  Requires-Dist: aiofiles
21
+ Requires-Dist: websockets
24
22
  Requires-Dist: vcorelib>=3.5.1
23
+ Requires-Dist: svgen>=0.7.4
24
+ Requires-Dist: psutil
25
25
  Provides-Extra: test
26
26
  Requires-Dist: pylint; extra == "test"
27
27
  Requires-Dist: flake8; extra == "test"
@@ -49,11 +49,11 @@ Dynamic: requires-python
49
49
  =====================================
50
50
  generator=datazen
51
51
  version=3.1.4
52
- hash=f3a77d6dfc0bda171a9716c3731531c5
52
+ hash=663b9a39a640cae079d35c0621ae20f9
53
53
  =====================================
54
54
  -->
55
55
 
56
- # runtimepy ([5.9.1](https://pypi.org/project/runtimepy/))
56
+ # runtimepy ([5.9.2](https://pypi.org/project/runtimepy/))
57
57
 
58
58
  [![python](https://img.shields.io/pypi/pyversions/runtimepy.svg)](https://pypi.org/project/runtimepy/)
59
59
  ![Build Status](https://github.com/vkottler/runtimepy/workflows/Python%20Package/badge.svg)
@@ -1,4 +1,4 @@
1
- runtimepy/__init__.py,sha256=WYh3eb-XrVkK9YtfaTCSVSalmUbmw6WkcNIFMdC2A7Y,390
1
+ runtimepy/__init__.py,sha256=8xWVxuWwxsXJGjNAD_wAhQl8kTAend0Cz5sjesrRoKs,390
2
2
  runtimepy/__main__.py,sha256=OPAed6hggoQdw-6QAR62mqLC-rCkdDhOq0wyeS2vDRI,332
3
3
  runtimepy/app.py,sha256=sTvatbsGZ2Hdel36Si_WUbNMtg9CzsJyExr5xjIcxDE,970
4
4
  runtimepy/dev_requirements.txt,sha256=j0dh11ztJAzfaUL0iFheGjaZj9ppDzmTkclTT8YKO8c,230
@@ -272,7 +272,7 @@ runtimepy/task/asynchronous.py,sha256=w4oEUCyj-X-zDVFmlsAtRL1gv66ahQ78QKE0GmLGT1
272
272
  runtimepy/task/sample.py,sha256=_nbLj5Julwa1NJC_-WQsotI0890G-TlOWftVHEKiclY,2735
273
273
  runtimepy/task/basic/__init__.py,sha256=NryfG-JmSyqYh-TNG4NLO6-9RJFVq5vn1Z-oV3qTVvg,243
274
274
  runtimepy/task/basic/manager.py,sha256=2P_swKZlFfPHCmX6sMVGSYePWEZOqXp9B4YPyRYSGCo,1858
275
- runtimepy/task/basic/periodic.py,sha256=VevcEzxMsKwqDU18ejOgmbhMYEwjkc-uePSQV7qumCA,7286
275
+ runtimepy/task/basic/periodic.py,sha256=81ACFNzttJh2PQryHUA8La9MJvDUOSTxfiXkqtaOK4M,7595
276
276
  runtimepy/task/trig/__init__.py,sha256=GuGNb9eLuFEnl3nAI7Mi_eS5mqJ4MOhEy2Wfv48RFic,785
277
277
  runtimepy/telemetry/__init__.py,sha256=G_JLZsp0EZMGaxSQ12fYgbG2kN4QkvVG4lExV_TzEhM,268
278
278
  runtimepy/telemetry/sample.py,sha256=1weoGSH-yGg-fOaLysZAsO3dSTM6yAXX3XdulAiqi3s,3216
@@ -284,9 +284,9 @@ runtimepy/tui/task.py,sha256=nUZo9fuOC-k1Wpqdzkv9v1tQirCI28fZVgcC13Ijvus,1093
284
284
  runtimepy/tui/channels/__init__.py,sha256=evDaiIn-YS9uGhdo8ZGtP9VK1ek6sr_P1nJ9JuSET0o,4536
285
285
  runtimepy/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
286
286
  runtimepy/ui/controls.py,sha256=yvT7h3thbYaitsakcIAJ90EwKzJ4b-jnc6p3UuVf_XE,1241
287
- runtimepy-5.9.1.dist-info/LICENSE,sha256=yKBRwbO-cOPBrlpsZmJkkSa33DfY31aE8t7lZ0DwlUo,1071
288
- runtimepy-5.9.1.dist-info/METADATA,sha256=1_fDtWfB-WZA3Jn79TabypVK4cR3UArOAj3Z6puQ124,9371
289
- runtimepy-5.9.1.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
290
- runtimepy-5.9.1.dist-info/entry_points.txt,sha256=-btVBkYv7ybcopqZ_pRky-bEzu3vhbaG3W3Z7ERBiFE,51
291
- runtimepy-5.9.1.dist-info/top_level.txt,sha256=0jPmh6yqHyyJJDwEID-LpQly-9kQ3WRMjH7Lix8peLg,10
292
- runtimepy-5.9.1.dist-info/RECORD,,
287
+ runtimepy-5.9.2.dist-info/LICENSE,sha256=yKBRwbO-cOPBrlpsZmJkkSa33DfY31aE8t7lZ0DwlUo,1071
288
+ runtimepy-5.9.2.dist-info/METADATA,sha256=Gg-EmUL90ZpybmT4WzcVlaYKlqbo5VrBboNt2_sbq6g,9371
289
+ runtimepy-5.9.2.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
290
+ runtimepy-5.9.2.dist-info/entry_points.txt,sha256=-btVBkYv7ybcopqZ_pRky-bEzu3vhbaG3W3Z7ERBiFE,51
291
+ runtimepy-5.9.2.dist-info/top_level.txt,sha256=0jPmh6yqHyyJJDwEID-LpQly-9kQ3WRMjH7Lix8peLg,10
292
+ runtimepy-5.9.2.dist-info/RECORD,,