nucliadb 6.6.1.post4644__py3-none-any.whl → 6.6.1.post4652__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.
@@ -25,7 +25,7 @@ import uuid
25
25
  from collections import defaultdict
26
26
  from contextlib import AsyncExitStack
27
27
  from enum import Enum
28
- from typing import Any, Optional, TypeVar
28
+ from typing import Any, Optional
29
29
 
30
30
  import aiohttp
31
31
  import backoff
@@ -49,10 +49,14 @@ from nucliadb_utils.utilities import Utility, clean_utility, get_utility, set_ut
49
49
 
50
50
  logger = logging.getLogger(__name__)
51
51
 
52
- _T = TypeVar("_T")
53
52
 
53
+ class ProcessingAPIUnavailableError(SendToProcessError): ...
54
54
 
55
- RETRIABLE_EXCEPTIONS = (aiohttp.client_exceptions.ClientConnectorError,)
55
+
56
+ RETRIABLE_EXCEPTIONS = (
57
+ aiohttp.client_exceptions.ClientConnectorError,
58
+ ProcessingAPIUnavailableError,
59
+ )
56
60
  MAX_TRIES = 4
57
61
 
58
62
 
@@ -409,6 +413,9 @@ class ProcessingEngine:
409
413
  raise LimitsExceededError(resp.status, data["detail"])
410
414
  elif resp.status == 429:
411
415
  raise LimitsExceededError(resp.status, "Rate limited")
416
+ elif resp.status in (502, 503):
417
+ logger.warning(f"Processing engine is not available, retrying. Status: {resp.status}")
418
+ raise ProcessingAPIUnavailableError()
412
419
  else:
413
420
  error_text = await resp.text()
414
421
  logger.warning(f"Error sending to process: {resp.status} {error_text}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nucliadb
3
- Version: 6.6.1.post4644
3
+ Version: 6.6.1.post4652
4
4
  Summary: NucliaDB
5
5
  Author-email: Nuclia <nucliadb@nuclia.com>
6
6
  License-Expression: AGPL-3.0-or-later
@@ -19,11 +19,11 @@ Classifier: Programming Language :: Python :: 3.12
19
19
  Classifier: Programming Language :: Python :: 3 :: Only
20
20
  Requires-Python: <4,>=3.9
21
21
  Description-Content-Type: text/markdown
22
- Requires-Dist: nucliadb-telemetry[all]>=6.6.1.post4644
23
- Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.6.1.post4644
24
- Requires-Dist: nucliadb-protos>=6.6.1.post4644
25
- Requires-Dist: nucliadb-models>=6.6.1.post4644
26
- Requires-Dist: nidx-protos>=6.6.1.post4644
22
+ Requires-Dist: nucliadb-telemetry[all]>=6.6.1.post4652
23
+ Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.6.1.post4652
24
+ Requires-Dist: nucliadb-protos>=6.6.1.post4652
25
+ Requires-Dist: nucliadb-models>=6.6.1.post4652
26
+ Requires-Dist: nidx-protos>=6.6.1.post4652
27
27
  Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
28
28
  Requires-Dist: nuclia-models>=0.43.0
29
29
  Requires-Dist: uvicorn[standard]
@@ -133,7 +133,7 @@ nucliadb/export_import/utils.py,sha256=XV3tJJdhgnVJRSj8AxZjgeipONtB107M185HVJmHp
133
133
  nucliadb/ingest/__init__.py,sha256=fsw3C38VP50km3R-nHL775LNGPpJ4JxqXJ2Ib1f5SqE,1011
134
134
  nucliadb/ingest/app.py,sha256=qiPad2eWgudRdLq0tB0MQZOxOezXO7QBK_ZpPNKQZO0,7378
135
135
  nucliadb/ingest/partitions.py,sha256=2NIhMYbNT0TNBL6bX1UMSi7vxFGICstCKEqsB0TXHOE,2410
136
- nucliadb/ingest/processing.py,sha256=QmkHq-BU4vub7JRWe9VHvQ2DcAmT6-CzgFXuZxXhcBU,20953
136
+ nucliadb/ingest/processing.py,sha256=gAm591llkscMq0abhxQmpChDZIzto-76Dni4f7Flhfw,21229
137
137
  nucliadb/ingest/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
138
138
  nucliadb/ingest/serialize.py,sha256=-TIjibJTbMqAowzRvyrG3R209vKqBZqXpdrQL9Dq4lo,16135
139
139
  nucliadb/ingest/settings.py,sha256=5qJICxwYb028a2iAhVbxOJB5X-hWtDLtiya-YhWostw,3179
@@ -376,8 +376,8 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
376
376
  nucliadb/writer/tus/s3.py,sha256=vF0NkFTXiXhXq3bCVXXVV-ED38ECVoUeeYViP8uMqcU,8357
377
377
  nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
378
378
  nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
379
- nucliadb-6.6.1.post4644.dist-info/METADATA,sha256=8tC1EkXnRP8JufeIT3WSj-A5xslLX11m-kLrFZWQgwQ,4158
380
- nucliadb-6.6.1.post4644.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
381
- nucliadb-6.6.1.post4644.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
382
- nucliadb-6.6.1.post4644.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
383
- nucliadb-6.6.1.post4644.dist-info/RECORD,,
379
+ nucliadb-6.6.1.post4652.dist-info/METADATA,sha256=kzZwOYp6WyEtGjNS2fm2GGgRU3j9N8F62JK7PQ6Hhq4,4158
380
+ nucliadb-6.6.1.post4652.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
381
+ nucliadb-6.6.1.post4652.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
382
+ nucliadb-6.6.1.post4652.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
383
+ nucliadb-6.6.1.post4652.dist-info/RECORD,,