nucliadb-utils 6.0.1.post2404__py3-none-any.whl → 6.0.1.post2415__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/run.py CHANGED
@@ -18,6 +18,7 @@
18
18
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  import asyncio
21
+ import inspect
21
22
  import logging
22
23
  import signal
23
24
  from typing import Awaitable, Callable
@@ -44,6 +45,9 @@ async def run_until_exit(finalizers: list[Callable[[], Awaitable[None]]], sleep:
44
45
 
45
46
  for finalizer in finalizers:
46
47
  try:
47
- await finalizer()
48
+ if inspect.iscoroutinefunction(finalizer):
49
+ await finalizer()
50
+ else:
51
+ finalizer()
48
52
  except Exception:
49
53
  logger.exception("Error while finalizing", exc_info=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nucliadb_utils
3
- Version: 6.0.1.post2404
3
+ Version: 6.0.1.post2415
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.1.post2404
28
- Requires-Dist: nucliadb-telemetry>=6.0.1.post2404
27
+ Requires-Dist: nucliadb-protos>=6.0.1.post2415
28
+ Requires-Dist: nucliadb-telemetry>=6.0.1.post2415
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"
@@ -11,7 +11,7 @@ nucliadb_utils/indexing.py,sha256=Luaqcar3CySpdYOFp6Q9Fyr8ZYwhYhaKRHQ_VGL78f8,23
11
11
  nucliadb_utils/nats.py,sha256=prs98dIrGh2-WchQcRBloc5wYhpjEnB0VtCERPnoReg,8430
12
12
  nucliadb_utils/partition.py,sha256=jBgy4Hu5Iwn4gjbPPcthSykwf-qNx-GcLAIwbzPd1d0,1157
13
13
  nucliadb_utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- nucliadb_utils/run.py,sha256=HpAIM8xbR7UpVC2_7xOjB4fYbUVykyPP6yHrv2RD3DI,1707
14
+ nucliadb_utils/run.py,sha256=Es0_Bu5Yc-LWczvwL6gzWqSwC85RjDCk-0oFQAJi9g4,1827
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
@@ -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.1.post2404.dist-info/METADATA,sha256=oRIDNrH2uXTmaMBsckXZP_tgg13AC8N4s_-c2rdBkTw,2055
63
- nucliadb_utils-6.0.1.post2404.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
64
- nucliadb_utils-6.0.1.post2404.dist-info/top_level.txt,sha256=fE3vJtALTfgh7bcAWcNhcfXkNPp_eVVpbKK-2IYua3E,15
65
- nucliadb_utils-6.0.1.post2404.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
66
- nucliadb_utils-6.0.1.post2404.dist-info/RECORD,,
62
+ nucliadb_utils-6.0.1.post2415.dist-info/METADATA,sha256=bUNX3_s0TvnM9WZX5qVj7ZeYiXabohLrH-Ywvt-aJDs,2055
63
+ nucliadb_utils-6.0.1.post2415.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
64
+ nucliadb_utils-6.0.1.post2415.dist-info/top_level.txt,sha256=fE3vJtALTfgh7bcAWcNhcfXkNPp_eVVpbKK-2IYua3E,15
65
+ nucliadb_utils-6.0.1.post2415.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
66
+ nucliadb_utils-6.0.1.post2415.dist-info/RECORD,,