nucliadb-utils 4.0.3.post590__py3-none-any.whl → 4.0.3.post591__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 +9 -1
- {nucliadb_utils-4.0.3.post590.dist-info → nucliadb_utils-4.0.3.post591.dist-info}/METADATA +3 -3
- {nucliadb_utils-4.0.3.post590.dist-info → nucliadb_utils-4.0.3.post591.dist-info}/RECORD +6 -6
- {nucliadb_utils-4.0.3.post590.dist-info → nucliadb_utils-4.0.3.post591.dist-info}/WHEEL +0 -0
- {nucliadb_utils-4.0.3.post590.dist-info → nucliadb_utils-4.0.3.post591.dist-info}/top_level.txt +0 -0
- {nucliadb_utils-4.0.3.post590.dist-info → nucliadb_utils-4.0.3.post591.dist-info}/zip-safe +0 -0
nucliadb_utils/transaction.py
CHANGED
@@ -24,6 +24,7 @@ from functools import partial
|
|
24
24
|
from typing import Any, Optional, Union
|
25
25
|
|
26
26
|
import nats
|
27
|
+
import nats.errors
|
27
28
|
from nats.aio.client import Client
|
28
29
|
from nats.js.client import JetStreamContext
|
29
30
|
|
@@ -53,6 +54,10 @@ class TransactionCommitTimeoutError(Exception):
|
|
53
54
|
pass
|
54
55
|
|
55
56
|
|
57
|
+
class MaxTransactionSizeExceededError(Exception):
|
58
|
+
pass
|
59
|
+
|
60
|
+
|
56
61
|
class LocalTransactionUtility:
|
57
62
|
async def commit(
|
58
63
|
self,
|
@@ -195,7 +200,10 @@ class TransactionUtility:
|
|
195
200
|
if target_subject is None:
|
196
201
|
target_subject = const.Streams.INGEST.subject.format(partition=partition)
|
197
202
|
|
198
|
-
|
203
|
+
try:
|
204
|
+
res = await self.js.publish(target_subject, writer.SerializeToString(), headers=headers)
|
205
|
+
except nats.errors.MaxPayloadError as ex:
|
206
|
+
raise MaxTransactionSizeExceededError() from ex
|
199
207
|
|
200
208
|
waiting_for.seq = res.seq
|
201
209
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nucliadb_utils
|
3
|
-
Version: 4.0.3.
|
3
|
+
Version: 4.0.3.post591
|
4
4
|
Home-page: https://nuclia.com
|
5
5
|
License: BSD
|
6
6
|
Classifier: Development Status :: 4 - Beta
|
@@ -23,8 +23,8 @@ Requires-Dist: PyNaCl
|
|
23
23
|
Requires-Dist: pyjwt >=2.4.0
|
24
24
|
Requires-Dist: memorylru >=1.1.2
|
25
25
|
Requires-Dist: mrflagly
|
26
|
-
Requires-Dist: nucliadb-protos >=4.0.3.
|
27
|
-
Requires-Dist: nucliadb-telemetry >=4.0.3.
|
26
|
+
Requires-Dist: nucliadb-protos >=4.0.3.post591
|
27
|
+
Requires-Dist: nucliadb-telemetry >=4.0.3.post591
|
28
28
|
Provides-Extra: cache
|
29
29
|
Requires-Dist: redis >=4.3.4 ; extra == 'cache'
|
30
30
|
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=fI3AOn30tNvYS_PqoKilVhJN4OppPAGCM6-OUUitO2s,7192
|
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=mwcI3aIHAvU5KOGqd_Uz_d1XQzXhk_-NWY8NqU1lfb0,7307
|
19
19
|
nucliadb_utils/utilities.py,sha256=E7W9TzvbyJ7_Yenho9CT059E_g4JQOCS02HrGurwNqs,13603
|
20
20
|
nucliadb_utils/audit/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
|
21
21
|
nucliadb_utils/audit/audit.py,sha256=dn5ZnCVQUlCcvdjzaORghbrjk9QgVGrtkfIftq30Bp8,2819
|
@@ -54,8 +54,8 @@ nucliadb_utils/tests/indexing.py,sha256=YW2QhkhO9Q_8A4kKWJaWSvXvyQ_AiAwY1VylcfVQ
|
|
54
54
|
nucliadb_utils/tests/local.py,sha256=c3gZJJWmvOftruJkIQIwB3q_hh3uxEhqGIAVWim1Bbk,1343
|
55
55
|
nucliadb_utils/tests/nats.py,sha256=Tosonm9A9cusImyji80G4pgdXEHNVPaCLT5TbFK_ra0,7543
|
56
56
|
nucliadb_utils/tests/s3.py,sha256=YB8QqDaBXxyhHonEHmeBbRRDmvB7sTOaKBSi8KBGokg,2330
|
57
|
-
nucliadb_utils-4.0.3.
|
58
|
-
nucliadb_utils-4.0.3.
|
59
|
-
nucliadb_utils-4.0.3.
|
60
|
-
nucliadb_utils-4.0.3.
|
61
|
-
nucliadb_utils-4.0.3.
|
57
|
+
nucliadb_utils-4.0.3.post591.dist-info/METADATA,sha256=qjZryqWtLs3-8d4gzD0t8u_6B5HzD0O_d18e9jgry-g,2030
|
58
|
+
nucliadb_utils-4.0.3.post591.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
59
|
+
nucliadb_utils-4.0.3.post591.dist-info/top_level.txt,sha256=fE3vJtALTfgh7bcAWcNhcfXkNPp_eVVpbKK-2IYua3E,15
|
60
|
+
nucliadb_utils-4.0.3.post591.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
61
|
+
nucliadb_utils-4.0.3.post591.dist-info/RECORD,,
|
File without changes
|
{nucliadb_utils-4.0.3.post590.dist-info → nucliadb_utils-4.0.3.post591.dist-info}/top_level.txt
RENAMED
File without changes
|
File without changes
|