moat-kv 0.71.7__py3-none-any.whl → 0.71.9__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.
- moat/kv/command/code.py +2 -2
- moat/kv/model.py +2 -0
- moat/kv/server.py +11 -6
- {moat_kv-0.71.7.dist-info → moat_kv-0.71.9.dist-info}/METADATA +1 -1
- {moat_kv-0.71.7.dist-info → moat_kv-0.71.9.dist-info}/RECORD +11 -11
- {moat_kv-0.71.7.dist-info → moat_kv-0.71.9.dist-info}/WHEEL +0 -0
- {moat_kv-0.71.7.dist-info → moat_kv-0.71.9.dist-info}/licenses/LICENSE +0 -0
- {moat_kv-0.71.7.dist-info → moat_kv-0.71.9.dist-info}/licenses/LICENSE.APACHE2 +0 -0
- {moat_kv-0.71.7.dist-info → moat_kv-0.71.9.dist-info}/licenses/LICENSE.MIT +0 -0
- {moat_kv-0.71.7.dist-info → moat_kv-0.71.9.dist-info}/licenses/LICENSE.txt +0 -0
- {moat_kv-0.71.7.dist-info → moat_kv-0.71.9.dist-info}/top_level.txt +0 -0
moat/kv/command/code.py
CHANGED
@@ -33,7 +33,7 @@ async def cli(ctx, path):
|
|
33
33
|
|
34
34
|
|
35
35
|
@cli.command()
|
36
|
-
@click.option("-
|
36
|
+
@click.option("-S", "--script", type=click.File(mode="w", lazy=True), help="Save the code here")
|
37
37
|
@click.pass_obj
|
38
38
|
async def get(obj, script):
|
39
39
|
"""Read a code entry"""
|
@@ -64,7 +64,7 @@ async def get(obj, script):
|
|
64
64
|
default=True,
|
65
65
|
)
|
66
66
|
@click.option("-t", "--thread", is_flag=True, help="The code should run in a worker thread")
|
67
|
-
@click.option("-
|
67
|
+
@click.option("-S", "--script", type=click.File(mode="r"), help="File with the code")
|
68
68
|
@click.option("-i", "--info", type=str, help="one-liner info about the code")
|
69
69
|
@click.option("-d", "--data", type=click.File(mode="r"), help="load the metadata (YAML)")
|
70
70
|
@attr_args
|
moat/kv/model.py
CHANGED
moat/kv/server.py
CHANGED
@@ -225,11 +225,16 @@ class StreamCommand:
|
|
225
225
|
except Exception as exc:
|
226
226
|
if not isinstance(exc, CancelledError):
|
227
227
|
self.client.logger.exception("ERS%d %r", self.client._client_nr, self.msg)
|
228
|
-
|
228
|
+
try:
|
229
|
+
await self.send(error=repr(exc))
|
230
|
+
except Exception:
|
231
|
+
pass
|
229
232
|
finally:
|
230
233
|
with anyio.move_on_after(2, shield=True):
|
231
|
-
|
234
|
+
try:
|
232
235
|
await self.send(state="end")
|
236
|
+
except Exception:
|
237
|
+
pass
|
233
238
|
|
234
239
|
else:
|
235
240
|
res = await self.run(**kw)
|
@@ -2131,7 +2136,7 @@ class Server:
|
|
2131
2136
|
nodes=True,
|
2132
2137
|
from_server=self.node.name,
|
2133
2138
|
known=True,
|
2134
|
-
deleted=
|
2139
|
+
deleted=False,
|
2135
2140
|
iter=False,
|
2136
2141
|
)
|
2137
2142
|
await self._process_info(res)
|
@@ -2445,7 +2450,7 @@ class Server:
|
|
2445
2450
|
shorter(res)
|
2446
2451
|
await writer(res)
|
2447
2452
|
|
2448
|
-
msg = await self.get_state(nodes=True, known=True, deleted=
|
2453
|
+
msg = await self.get_state(nodes=True, known=True, deleted=False)
|
2449
2454
|
# await writer({"info": msg})
|
2450
2455
|
await writer(msg) # XXX legacy
|
2451
2456
|
await self.root.walk(saver, full=full)
|
@@ -2483,7 +2488,7 @@ class Server:
|
|
2483
2488
|
shorter = PathShortener([])
|
2484
2489
|
|
2485
2490
|
async with MsgWriter(path=path, stream=stream, codec="std-msgpack") as mw:
|
2486
|
-
msg = await self.get_state(nodes=True, known=True, deleted=
|
2491
|
+
msg = await self.get_state(nodes=True, known=True, deleted=False)
|
2487
2492
|
# await mw({"info": msg})
|
2488
2493
|
await mw(msg) # XXX legacy
|
2489
2494
|
last_saved = time.monotonic()
|
@@ -2507,7 +2512,7 @@ class Server:
|
|
2507
2512
|
t = time.monotonic()
|
2508
2513
|
td = t - last_saved
|
2509
2514
|
if td >= 60 or last_saved_count > 1000:
|
2510
|
-
msg = await self.get_state(nodes=True, known=True, deleted=
|
2515
|
+
msg = await self.get_state(nodes=True, known=True, deleted=False)
|
2511
2516
|
# await mw({"info": msg})
|
2512
2517
|
await mw(msg) # XXX legacy
|
2513
2518
|
await mw.flush()
|
@@ -7,9 +7,9 @@ moat/kv/config.py,sha256=cWJ1m8PRwzzapsin1XSDjRtYJCgNN6g7gA9q48luDV8,1093
|
|
7
7
|
moat/kv/data.py,sha256=85N2W_pDVRgBn7l9AGdDZHvuHrIPGlbxzgXi_3S0DSI,5924
|
8
8
|
moat/kv/errors.py,sha256=cjX0e184EC10HvQ7UOkWdWmc1A8jPr983IFR8UkaI8U,17089
|
9
9
|
moat/kv/exceptions.py,sha256=4gRsYa6kuBy1qFYiBUYElup_cvOe7QgPQtryHAYphzo,1849
|
10
|
-
moat/kv/model.py,sha256=
|
10
|
+
moat/kv/model.py,sha256=6OZFWK5XlwMlGyRyx964x7qz1FUOxCAVeX3LyS2riPo,33344
|
11
11
|
moat/kv/runner.py,sha256=6vpChgCjiWHAjc2u0bbOOQ8cT5KB-f4uBnQb8MgH9wk,41826
|
12
|
-
moat/kv/server.py,sha256=
|
12
|
+
moat/kv/server.py,sha256=QX794Bg2U3rXgpLAHvy1x1G3hnZhLR7YMnfvy8WWkW4,94215
|
13
13
|
moat/kv/types.py,sha256=aCi7_LXzqwruHbEEDJukOjnXNUC2HUaDbgblN8Q05Rc,13998
|
14
14
|
moat/kv/actor/__init__.py,sha256=i560uy9WLE4SmOXWcXKjFKNKZdRR51jOwWg7cSASVRo,2131
|
15
15
|
moat/kv/actor/deletor.py,sha256=F-pb0jHddhmqLp65G7vbZ_QIxXu5ZF0UBzHWKRgN45U,4537
|
@@ -22,7 +22,7 @@ moat/kv/backend/mqtt.py,sha256=KSerkVN4MHhzjFprZMraTk56Hj0Hx1vev9xfYoKST2A,2009
|
|
22
22
|
moat/kv/command/__init__.py,sha256=9_8wL9Scv8_Cs8HJyJHGvx1vwXErsuvlsAqNZLcJQR0,8
|
23
23
|
moat/kv/command/acl.py,sha256=wSdlzKBjWIFX3IxCdLcG3ZqjvtX8KPtqe38ibyU2VDo,4665
|
24
24
|
moat/kv/command/auth.py,sha256=vP22ZIBMjRdUxN4_ELKiDgIE5ZqdMxs1ky1WDVUx50M,7149
|
25
|
-
moat/kv/command/code.py,sha256=
|
25
|
+
moat/kv/command/code.py,sha256=ldXh64strXnkLnXbMCRVT-8pL3lRN3k0kUYzfSw7PiA,8066
|
26
26
|
moat/kv/command/codec.py,sha256=8GqOl-oxWFM2D1Fm9Iheot2AmS_SsOYfqfbbde3qvQY,6028
|
27
27
|
moat/kv/command/data.py,sha256=HcLMMcAnyMBH4iH8X0hZiBgmsnV1yppOlg26zB9R72A,8400
|
28
28
|
moat/kv/command/error.py,sha256=XqHmVJgBGjr6XOozi23wEjiTqPopD1CzkIeR1a3Z_vY,4350
|
@@ -37,11 +37,11 @@ moat/kv/mock/mqtt.py,sha256=b9pzbwQBmTX2eSiSgNO7nh2-7l8-0TT8n2GxinQ-1l0,5213
|
|
37
37
|
moat/kv/mock/tracer.py,sha256=qLEIn9gdlYUypyRYD8O8SbM8ye8XR4xtBl3otP6uNLs,2058
|
38
38
|
moat/kv/obj/__init__.py,sha256=OaQ7PsvvhRhd_H7KUM15nGeApckkCyOv7Xf4llqkzi0,19792
|
39
39
|
moat/kv/obj/command.py,sha256=PzMQOEsXRKjKU3WvFtq1QaPJYBk6oWScKIrA-hAD5vg,7426
|
40
|
-
moat_kv-0.71.
|
41
|
-
moat_kv-0.71.
|
42
|
-
moat_kv-0.71.
|
43
|
-
moat_kv-0.71.
|
44
|
-
moat_kv-0.71.
|
45
|
-
moat_kv-0.71.
|
46
|
-
moat_kv-0.71.
|
47
|
-
moat_kv-0.71.
|
40
|
+
moat_kv-0.71.9.dist-info/licenses/LICENSE,sha256=ZSyHhIjRRWNh4Iw_hgf9e6WYkqFBA9Fczk_5PIW1zIs,185
|
41
|
+
moat_kv-0.71.9.dist-info/licenses/LICENSE.APACHE2,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
42
|
+
moat_kv-0.71.9.dist-info/licenses/LICENSE.MIT,sha256=Pm2uVV65J4f8gtHUg1Vnf0VMf2Wus40_nnK_mj2vA0s,1046
|
43
|
+
moat_kv-0.71.9.dist-info/licenses/LICENSE.txt,sha256=L5vKJLVOg5t0CEEPpW9-O_0vzbP0PEjEF06tLvnIDuk,541
|
44
|
+
moat_kv-0.71.9.dist-info/METADATA,sha256=SQGKnXJYQgUDYiw2jOgy0kHqdrryHd9XegOOsvIkMMw,3376
|
45
|
+
moat_kv-0.71.9.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
46
|
+
moat_kv-0.71.9.dist-info/top_level.txt,sha256=pcs9fl5w5AB5GVi4SvBqIVmFrkRwQkVw_dEvW0Q0cSA,5
|
47
|
+
moat_kv-0.71.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|