moat-kv-ow 0.9.2__tar.gz → 0.9.4__tar.gz
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.
- {moat-kv-ow-0.9.2/moat_kv_ow.egg-info → moat-kv-ow-0.9.4}/PKG-INFO +1 -1
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat/kv/ow/model.py +6 -8
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4/moat_kv_ow.egg-info}/PKG-INFO +1 -1
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/.gitignore +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/.pylintrc +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/Makefile +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/README.rst +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/TODO.rst +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/USAGE.rst +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat/kv/ow/__init__.py +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat/kv/ow/_config.yaml +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat/kv/ow/_main.py +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat/kv/ow/mock.py +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat/kv/ow/task.py +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat-kv-ow@.service +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat_kv_ow.egg-info/SOURCES.txt +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat_kv_ow.egg-info/dependency_links.txt +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat_kv_ow.egg-info/requires.txt +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/moat_kv_ow.egg-info/top_level.txt +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/pyproject.toml +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/setup.cfg +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/tests/__init__.py +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/tests/conftest.py +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/tests/test_alarm.py +0 -0
- {moat-kv-ow-0.9.2 → moat-kv-ow-0.9.4}/tools/update-0-4.py +0 -0
@@ -60,13 +60,11 @@ class OWFSattr(ClientEntry):
|
|
60
60
|
src_attr = val.get("src_attr", ())
|
61
61
|
if force or src != self.watch_src:
|
62
62
|
if self.watch_src_scope is not None:
|
63
|
-
|
63
|
+
self.watch_src_scope.cancel()
|
64
64
|
self.watch_src = src
|
65
65
|
self.watch_src_attr = src_attr
|
66
66
|
if src is not None:
|
67
|
-
|
68
|
-
await self.root._tg.spawn(self._watch_src, evt)
|
69
|
-
await evt.wait()
|
67
|
+
await self.root._tg.start(self._watch_src)
|
70
68
|
else:
|
71
69
|
await self.root.err.record_working(
|
72
70
|
"owfs", self.subpath + ("write",), comment="dropped"
|
@@ -130,20 +128,20 @@ class OWFSattr(ClientEntry):
|
|
130
128
|
else:
|
131
129
|
await self.root.err.record_working("owfs", self.subpath + ("read",))
|
132
130
|
|
133
|
-
async def _watch_src(self,
|
131
|
+
async def _watch_src(self, task_status=anyio.TASK_STATUS_IGNORED):
|
134
132
|
"""
|
135
133
|
Task that monitors one entry and writes its value to the 1wire
|
136
134
|
device.
|
137
135
|
"""
|
138
|
-
|
136
|
+
with anyio.CancelScope() as sc:
|
139
137
|
try:
|
140
138
|
async with self.client.watch(
|
141
139
|
self.watch_src, min_depth=0, max_depth=0, fetch=True
|
142
140
|
) as wp:
|
143
141
|
if self.watch_src_scope is not None:
|
144
|
-
|
142
|
+
self.watch_src_scope.cancel()
|
145
143
|
self.watch_src_scope = sc
|
146
|
-
|
144
|
+
task_status.started()
|
147
145
|
|
148
146
|
async for msg in wp:
|
149
147
|
logger.debug("Process %r", msg)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|