nucliadb 6.4.0.post4161__py3-none-any.whl → 6.4.0.post4171__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.
@@ -22,6 +22,7 @@ import asyncio
22
22
  import logging
23
23
  import uuid
24
24
  from functools import partial
25
+ from typing import Any
25
26
 
26
27
  from nidx_protos import nodereader_pb2, noderesources_pb2
27
28
 
@@ -85,8 +86,8 @@ class IndexAuditHandler:
85
86
  await self.pubsub.unsubscribe(self.subscription_id)
86
87
  await self.task_handler.finalize()
87
88
 
88
- async def handle_message(self, raw_data: bytes) -> None:
89
- data = self.pubsub.parse(raw_data)
89
+ async def handle_message(self, msg: Any) -> None:
90
+ data = self.pubsub.parse(msg)
90
91
  notification = writer_pb2.Notification()
91
92
  notification.ParseFromString(data)
92
93
 
@@ -169,8 +170,8 @@ class ResourceWritesAuditHandler:
169
170
  async def finalize(self) -> None:
170
171
  await self.pubsub.unsubscribe(self.subscription_id)
171
172
 
172
- async def handle_message(self, raw_data) -> None:
173
- data = self.pubsub.parse(raw_data)
173
+ async def handle_message(self, msg: Any) -> None:
174
+ data = self.pubsub.parse(msg)
174
175
  notification = writer_pb2.Notification()
175
176
  notification.ParseFromString(data)
176
177
 
@@ -21,6 +21,7 @@
21
21
  import logging
22
22
  import uuid
23
23
  from functools import partial
24
+ from typing import Any
24
25
 
25
26
  from nucliadb.common import datamanagers
26
27
  from nucliadb.common.cluster.utils import get_shard_manager
@@ -77,8 +78,8 @@ class MaterializerHandler:
77
78
  await self.pubsub.unsubscribe(self.subscription_id)
78
79
  await self.task_handler.finalize()
79
80
 
80
- async def handle_message(self, raw_data) -> None:
81
- data = self.pubsub.parse(raw_data)
81
+ async def handle_message(self, msg: Any) -> None:
82
+ data = self.pubsub.parse(msg)
82
83
  notification = writer_pb2.Notification()
83
84
  notification.ParseFromString(data)
84
85
 
@@ -21,6 +21,7 @@
21
21
  import logging
22
22
  import uuid
23
23
  from functools import partial
24
+ from typing import Any
24
25
 
25
26
  from nidx_protos import nodereader_pb2, noderesources_pb2
26
27
 
@@ -75,8 +76,8 @@ class ShardCreatorHandler:
75
76
  await self.pubsub.unsubscribe(self.subscription_id)
76
77
  await self.task_handler.finalize()
77
78
 
78
- async def handle_message(self, raw_data) -> None:
79
- data = self.pubsub.parse(raw_data)
79
+ async def handle_message(self, msg: Any) -> None:
80
+ data = self.pubsub.parse(msg)
80
81
  notification = writer_pb2.Notification()
81
82
  notification.ParseFromString(data)
82
83
 
@@ -17,12 +17,10 @@
17
17
  # You should have received a copy of the GNU Affero General Public License
18
18
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
  #
20
- from typing import Optional
21
-
22
20
  from grpc import aio
23
21
 
24
22
  from nucliadb import health
25
- from nucliadb.ingest import logger
23
+ from nucliadb.ingest import SERVICE_NAME, logger
26
24
  from nucliadb.ingest.service.writer import WriterServicer
27
25
  from nucliadb.ingest.settings import settings
28
26
  from nucliadb_protos import writer_pb2_grpc
@@ -30,12 +28,12 @@ from nucliadb_telemetry.utils import setup_telemetry
30
28
  from nucliadb_utils.grpc import get_traced_grpc_server
31
29
 
32
30
 
33
- async def start_grpc(service_name: Optional[str] = None):
31
+ async def start_grpc(service_name: str = SERVICE_NAME):
34
32
  aio.init_grpc_aio() # type: ignore
35
33
 
36
- await setup_telemetry(service_name or "ingest")
34
+ await setup_telemetry(service_name)
37
35
  server = get_traced_grpc_server(
38
- service_name or "ingest",
36
+ service_name,
39
37
  max_receive_message=settings.max_receive_message_length,
40
38
  )
41
39
 
@@ -24,6 +24,7 @@ from collections.abc import AsyncGenerator
24
24
  from typing import Optional
25
25
 
26
26
  import async_timeout
27
+ from nats.aio.msg import Msg
27
28
 
28
29
  from nucliadb.common import datamanagers
29
30
  from nucliadb.common.context import ApplicationContext
@@ -91,8 +92,8 @@ async def kb_notifications(kbid: str) -> AsyncGenerator[writer_pb2.Notification,
91
92
 
92
93
  subscription_key = const.PubSubChannels.RESOURCE_NOTIFY.format(kbid=kbid)
93
94
 
94
- def subscription_handler(raw_data: bytes):
95
- data = pubsub.parse(raw_data)
95
+ def subscription_handler(msg: Msg):
96
+ data = pubsub.parse(msg)
96
97
  notification = writer_pb2.Notification()
97
98
  notification.ParseFromString(data)
98
99
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nucliadb
3
- Version: 6.4.0.post4161
3
+ Version: 6.4.0.post4171
4
4
  Summary: NucliaDB
5
5
  Author-email: Nuclia <nucliadb@nuclia.com>
6
6
  License: AGPL
@@ -20,11 +20,11 @@ Classifier: Programming Language :: Python :: 3.12
20
20
  Classifier: Programming Language :: Python :: 3 :: Only
21
21
  Requires-Python: <4,>=3.9
22
22
  Description-Content-Type: text/markdown
23
- Requires-Dist: nucliadb-telemetry[all]>=6.4.0.post4161
24
- Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.4.0.post4161
25
- Requires-Dist: nucliadb-protos>=6.4.0.post4161
26
- Requires-Dist: nucliadb-models>=6.4.0.post4161
27
- Requires-Dist: nidx-protos>=6.4.0.post4161
23
+ Requires-Dist: nucliadb-telemetry[all]>=6.4.0.post4171
24
+ Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.4.0.post4171
25
+ Requires-Dist: nucliadb-protos>=6.4.0.post4171
26
+ Requires-Dist: nucliadb-models>=6.4.0.post4171
27
+ Requires-Dist: nidx-protos>=6.4.0.post4171
28
28
  Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
29
29
  Requires-Dist: nuclia-models>=0.24.2
30
30
  Requires-Dist: uvicorn[standard]
@@ -125,13 +125,13 @@ nucliadb/ingest/serialize.py,sha256=-TIjibJTbMqAowzRvyrG3R209vKqBZqXpdrQL9Dq4lo,
125
125
  nucliadb/ingest/settings.py,sha256=0B-wQNa8FLqtNcQgRzh-fuIuGptM816XHcbH1NQKfmE,3050
126
126
  nucliadb/ingest/utils.py,sha256=l1myURu3r8oA11dx3GpHw-gNTUc1AFX8xdPm9Lgl2rA,2275
127
127
  nucliadb/ingest/consumer/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
128
- nucliadb/ingest/consumer/auditing.py,sha256=_4lwHWQPHRqYn-rAteTEVev25cxFo7566xxBLYu61cA,7198
128
+ nucliadb/ingest/consumer/auditing.py,sha256=xK21DIa_ZAiOJVVbnkmT4jgCRGshNGyPyxsqhE6kROE,7204
129
129
  nucliadb/ingest/consumer/consumer.py,sha256=OgS1fr5Yo55u-XbC6zypTH1aJ562Y1vZHnPDlJJpCXQ,13703
130
- nucliadb/ingest/consumer/materializer.py,sha256=7ofLbwjldJA8TWXDRZRM4U5EviZt3qNSQ8oadmkzS0Y,3840
130
+ nucliadb/ingest/consumer/materializer.py,sha256=tgD_rDI2twQzcz8kKNiW_L4YIth16IGh9mUfD5wiSD4,3858
131
131
  nucliadb/ingest/consumer/metrics.py,sha256=ji1l_4cKiHJthQd8YNem1ft4iMbw9KThmVvJmLcv3Xg,1075
132
132
  nucliadb/ingest/consumer/pull.py,sha256=EYT0ImngMQgatStG68p2GSrPQBbJxeuq8nFm8DdAbwk,9280
133
133
  nucliadb/ingest/consumer/service.py,sha256=BLM_dmKZkFBsYl3sj4MZZp5M3kkxHLuO7sE18PqIatw,6538
134
- nucliadb/ingest/consumer/shard_creator.py,sha256=SoG5e3MJJcM085UQnmLsY0q3WS-B8qkBclbwrhwe-uc,4341
134
+ nucliadb/ingest/consumer/shard_creator.py,sha256=w0smEu01FU_2cjZnsfBRNqT_Ntho11X17zTMST-vKbc,4359
135
135
  nucliadb/ingest/consumer/utils.py,sha256=jpX8D4lKzuPCpArQLZeX_Zczq3pfen_zAf8sPJfOEZU,2642
136
136
  nucliadb/ingest/fields/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
137
137
  nucliadb/ingest/fields/base.py,sha256=DTXFu_g9vSU2h7S4PlYxd-hp4SDuM_EPf8y51ALgD8w,21654
@@ -158,7 +158,7 @@ nucliadb/ingest/orm/processor/data_augmentation.py,sha256=v-pj4GbBWSuO8dQyahs5UD
158
158
  nucliadb/ingest/orm/processor/pgcatalog.py,sha256=ht9_I5WlPc6sSFTY8PsxHlpjN-EsaBaChwqsLlMXwUk,3100
159
159
  nucliadb/ingest/orm/processor/processor.py,sha256=jLGLyfj6TIXoLubmNvQvkj5K32MxDDSoktY6M8z5pVk,33149
160
160
  nucliadb/ingest/orm/processor/sequence_manager.py,sha256=uqEphtI1Ir_yk9jRl2gPf7BlzzXWovbARY5MNZSBI_8,1704
161
- nucliadb/ingest/service/__init__.py,sha256=MME_G_ERxzJR6JW_hfE2qcfXpmpH1kdG-S0a-M0qRm8,2043
161
+ nucliadb/ingest/service/__init__.py,sha256=LHQFUkdmNBOWqBG0Md9sMMI7g5TQZ-hLAnhw6ZblrJg,2002
162
162
  nucliadb/ingest/service/exceptions.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
163
163
  nucliadb/ingest/service/writer.py,sha256=EN-qEDJnL5in7cs1lC-z6b4ui_byFJMJ5huyCtwR_sU,21637
164
164
  nucliadb/middleware/__init__.py,sha256=A8NBlBuEkunCFMKpR9gnfNELsVn0Plc55BIQMbWDM8Q,2202
@@ -195,7 +195,7 @@ nucliadb/reader/api/v1/router.py,sha256=eyNmEGSP9zHkCIG5XlAXl6sukq950B7gFT3X2peM
195
195
  nucliadb/reader/api/v1/services.py,sha256=Q2n-QMfAVzSylu6qTUuPa6L3AfZ9jS3azVlfQdSqlA4,13443
196
196
  nucliadb/reader/api/v1/vectorsets.py,sha256=insTwaykshz442cMKa2VP74wJwvZrIYi0U7M9EM3aCM,1822
197
197
  nucliadb/reader/reader/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
198
- nucliadb/reader/reader/notifications.py,sha256=HVZNUlfbSuoZ9BsSs8wmzPeYurl0U0O2ooVlR9KSM3U,7792
198
+ nucliadb/reader/reader/notifications.py,sha256=6yUsPvvSRqayJ2peOtE0JY0v4657P_S5SAm32th0Y88,7809
199
199
  nucliadb/search/__init__.py,sha256=tnypbqcH4nBHbGpkINudhKgdLKpwXQCvDtPchUlsyY4,1511
200
200
  nucliadb/search/app.py,sha256=-WEX1AZRA8R_9aeOo9ovOTwjXW_7VfwWN7N2ccSoqXg,3387
201
201
  nucliadb/search/lifecycle.py,sha256=V_Pj5PRP0yyDY8d5LytO4X8p9HhN7UomqRG6Ri0UaFA,2206
@@ -365,8 +365,8 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
365
365
  nucliadb/writer/tus/s3.py,sha256=vF0NkFTXiXhXq3bCVXXVV-ED38ECVoUeeYViP8uMqcU,8357
366
366
  nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
367
367
  nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
368
- nucliadb-6.4.0.post4161.dist-info/METADATA,sha256=xZYY6m0tHa_k-3X9XuzMbfSy9oofa64mPUaTaCpq9GM,4226
369
- nucliadb-6.4.0.post4161.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
370
- nucliadb-6.4.0.post4161.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
371
- nucliadb-6.4.0.post4161.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
372
- nucliadb-6.4.0.post4161.dist-info/RECORD,,
368
+ nucliadb-6.4.0.post4171.dist-info/METADATA,sha256=GIwlyI4vyk76Z2HTHRqHV3nLbhqmPUGI_eJv4Efheas,4226
369
+ nucliadb-6.4.0.post4171.dist-info/WHEEL,sha256=ooBFpIzZCPdw3uqIQsOo4qqbA4ZRPxHnOH7peeONza0,91
370
+ nucliadb-6.4.0.post4171.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
371
+ nucliadb-6.4.0.post4171.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
372
+ nucliadb-6.4.0.post4171.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.0.0)
2
+ Generator: setuptools (80.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5