nucliadb-utils 6.0.0.post2324__py3-none-any.whl → 6.0.0.post2340__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.
- nucliadb_utils/transaction.py +10 -3
- {nucliadb_utils-6.0.0.post2324.dist-info → nucliadb_utils-6.0.0.post2340.dist-info}/METADATA +3 -3
- {nucliadb_utils-6.0.0.post2324.dist-info → nucliadb_utils-6.0.0.post2340.dist-info}/RECORD +6 -6
- {nucliadb_utils-6.0.0.post2324.dist-info → nucliadb_utils-6.0.0.post2340.dist-info}/WHEEL +0 -0
- {nucliadb_utils-6.0.0.post2324.dist-info → nucliadb_utils-6.0.0.post2340.dist-info}/top_level.txt +0 -0
- {nucliadb_utils-6.0.0.post2324.dist-info → nucliadb_utils-6.0.0.post2340.dist-info}/zip-safe +0 -0
nucliadb_utils/transaction.py
CHANGED
@@ -26,6 +26,7 @@ from typing import Any, Optional, Union
|
|
26
26
|
import nats
|
27
27
|
import nats.errors
|
28
28
|
from nats.aio.client import Client
|
29
|
+
from nats.aio.errors import ErrConnectionClosed
|
29
30
|
from nats.js.client import JetStreamContext
|
30
31
|
|
31
32
|
from nucliadb_protos.writer_pb2 import (
|
@@ -58,7 +59,7 @@ class MaxTransactionSizeExceededError(Exception):
|
|
58
59
|
pass
|
59
60
|
|
60
61
|
|
61
|
-
class
|
62
|
+
class StreamingServerError(Exception):
|
62
63
|
pass
|
63
64
|
|
64
65
|
|
@@ -199,7 +200,13 @@ class TransactionUtility:
|
|
199
200
|
request_id = uuid.uuid4().hex
|
200
201
|
|
201
202
|
if wait:
|
202
|
-
|
203
|
+
try:
|
204
|
+
waiting_event = await self.wait_for_commited(
|
205
|
+
writer.kbid, waiting_for, request_id=request_id
|
206
|
+
)
|
207
|
+
except ErrConnectionClosed:
|
208
|
+
logger.error("Connection to NATS is closed")
|
209
|
+
raise StreamingServerError()
|
203
210
|
|
204
211
|
if target_subject is None:
|
205
212
|
target_subject = const.Streams.INGEST.subject.format(partition=partition)
|
@@ -217,7 +224,7 @@ class TransactionUtility:
|
|
217
224
|
"resource": writer.uuid,
|
218
225
|
},
|
219
226
|
)
|
220
|
-
raise
|
227
|
+
raise StreamingServerError() from ex
|
221
228
|
|
222
229
|
waiting_for.seq = res.seq
|
223
230
|
|
{nucliadb_utils-6.0.0.post2324.dist-info → nucliadb_utils-6.0.0.post2340.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nucliadb_utils
|
3
|
-
Version: 6.0.0.
|
3
|
+
Version: 6.0.0.post2340
|
4
4
|
Home-page: https://nuclia.com
|
5
5
|
License: BSD
|
6
6
|
Classifier: Development Status :: 4 - Beta
|
@@ -24,8 +24,8 @@ Requires-Dist: PyNaCl
|
|
24
24
|
Requires-Dist: pyjwt>=2.4.0
|
25
25
|
Requires-Dist: memorylru>=1.1.2
|
26
26
|
Requires-Dist: mrflagly>=0.2.9
|
27
|
-
Requires-Dist: nucliadb-protos>=6.0.0.
|
28
|
-
Requires-Dist: nucliadb-telemetry>=6.0.0.
|
27
|
+
Requires-Dist: nucliadb-protos>=6.0.0.post2340
|
28
|
+
Requires-Dist: nucliadb-telemetry>=6.0.0.post2340
|
29
29
|
Provides-Extra: cache
|
30
30
|
Requires-Dist: redis>=4.3.4; extra == "cache"
|
31
31
|
Requires-Dist: orjson>=3.6.7; extra == "cache"
|
@@ -15,7 +15,7 @@ nucliadb_utils/run.py,sha256=HpAIM8xbR7UpVC2_7xOjB4fYbUVykyPP6yHrv2RD3DI,1707
|
|
15
15
|
nucliadb_utils/settings.py,sha256=BOuYTh08cJe7UgBgU9ALHCJm6eDezbdPsdAXM4HGEgo,8144
|
16
16
|
nucliadb_utils/signals.py,sha256=JRNv2y9zLtBjOANBf7krGfDGfOc9qcoXZ6N1nKWS2FE,2674
|
17
17
|
nucliadb_utils/store.py,sha256=kQ35HemE0v4_Qg6xVqNIJi8vSFAYQtwI3rDtMsNy62Y,890
|
18
|
-
nucliadb_utils/transaction.py,sha256=
|
18
|
+
nucliadb_utils/transaction.py,sha256=GjM754TU9940pfQY3vxAQAYlQdBpqfwrO-_gYkSjWrI,7979
|
19
19
|
nucliadb_utils/utilities.py,sha256=1C5o6WcOupoTfBRn6dgHc-XTZ2bsG397JVQCKy6swBo,15832
|
20
20
|
nucliadb_utils/aiopynecone/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
|
21
21
|
nucliadb_utils/aiopynecone/client.py,sha256=MPyHnDXwhukJr7U3CJh7BpsekfSuOkyM4g5b9LLtzc8,22941
|
@@ -59,8 +59,8 @@ nucliadb_utils/tests/indexing.py,sha256=YW2QhkhO9Q_8A4kKWJaWSvXvyQ_AiAwY1VylcfVQ
|
|
59
59
|
nucliadb_utils/tests/local.py,sha256=fXIBasrvdaFJM-sw2wk1_oiFzBcm9O10iCyC-OiXwY8,1914
|
60
60
|
nucliadb_utils/tests/nats.py,sha256=xqpww4jZjTKY9oPGlJdDJG67L3FIBQsa9qDHxILR8r8,7687
|
61
61
|
nucliadb_utils/tests/s3.py,sha256=pl-RJFjA4MH6iXkqhsh5g8gDuEhrYu1nPZ-laxlrMlE,3704
|
62
|
-
nucliadb_utils-6.0.0.
|
63
|
-
nucliadb_utils-6.0.0.
|
64
|
-
nucliadb_utils-6.0.0.
|
65
|
-
nucliadb_utils-6.0.0.
|
66
|
-
nucliadb_utils-6.0.0.
|
62
|
+
nucliadb_utils-6.0.0.post2340.dist-info/METADATA,sha256=MbR48tlmViGnpwl5Hjhb3jXCV2NQZ3ohvzZCgvS6yQs,2055
|
63
|
+
nucliadb_utils-6.0.0.post2340.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
64
|
+
nucliadb_utils-6.0.0.post2340.dist-info/top_level.txt,sha256=fE3vJtALTfgh7bcAWcNhcfXkNPp_eVVpbKK-2IYua3E,15
|
65
|
+
nucliadb_utils-6.0.0.post2340.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
66
|
+
nucliadb_utils-6.0.0.post2340.dist-info/RECORD,,
|
File without changes
|
{nucliadb_utils-6.0.0.post2324.dist-info → nucliadb_utils-6.0.0.post2340.dist-info}/top_level.txt
RENAMED
File without changes
|
{nucliadb_utils-6.0.0.post2324.dist-info → nucliadb_utils-6.0.0.post2340.dist-info}/zip-safe
RENAMED
File without changes
|