talentro-commons 0.20.3__py3-none-any.whl → 0.20.5__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.
- talentro/messaging/topology.py +7 -7
- talentro/services/rabbitmq.py +13 -6
- {talentro_commons-0.20.3.dist-info → talentro_commons-0.20.5.dist-info}/METADATA +1 -1
- {talentro_commons-0.20.3.dist-info → talentro_commons-0.20.5.dist-info}/RECORD +5 -5
- {talentro_commons-0.20.3.dist-info → talentro_commons-0.20.5.dist-info}/WHEEL +0 -0
talentro/messaging/topology.py
CHANGED
|
@@ -60,18 +60,18 @@ APPLICATIONS_TOPOLOGY = TopologyConfig(
|
|
|
60
60
|
dlx_name="x.applications.dlx",
|
|
61
61
|
retry_config={
|
|
62
62
|
# Integrations
|
|
63
|
-
"q.applications.raw.integrations": {"enabled": True, "ttl_ms": FIVE_MINUTES},
|
|
64
|
-
"q.applications.send.integrations": {"enabled": True, "ttl_ms": FIVE_MINUTES},
|
|
63
|
+
"q.applications.raw.integrations": {"enabled": True, "ttl_ms": FIVE_MINUTES, "max_retries": 3},
|
|
64
|
+
"q.applications.send.integrations": {"enabled": True, "ttl_ms": FIVE_MINUTES, "max_retries": 3},
|
|
65
65
|
|
|
66
66
|
# Acquisitions
|
|
67
|
-
"q.applications.saved.acquisitions": {"enabled": True, "ttl_ms": FIVE_MINUTES},
|
|
67
|
+
"q.applications.saved.acquisitions": {"enabled": True, "ttl_ms": FIVE_MINUTES, "max_retries": 3},
|
|
68
68
|
|
|
69
69
|
# Vacancies
|
|
70
|
-
"q.applications.saved.vacancies": {"enabled": True, "ttl_ms": FIVE_MINUTES},
|
|
70
|
+
"q.applications.saved.vacancies": {"enabled": True, "ttl_ms": FIVE_MINUTES, "max_retries": 3},
|
|
71
71
|
|
|
72
72
|
# Candidates
|
|
73
|
-
"q.applications.normalized.candidates": {"enabled": True, "ttl_ms": FIVE_MINUTES},
|
|
74
|
-
"q.applications.external.upserted.candidates": {"enabled": True, "ttl_ms": FIVE_MINUTES}
|
|
73
|
+
"q.applications.normalized.candidates": {"enabled": True, "ttl_ms": FIVE_MINUTES, "max_retries": 3},
|
|
74
|
+
"q.applications.external.upserted.candidates": {"enabled": True, "ttl_ms": FIVE_MINUTES, "max_retries": 3}
|
|
75
75
|
}
|
|
76
76
|
)
|
|
77
77
|
|
|
@@ -85,7 +85,7 @@ FEEDS_TOPOLOGY = TopologyConfig(
|
|
|
85
85
|
],
|
|
86
86
|
dlx_name="x.feeds.dlx",
|
|
87
87
|
retry_config={
|
|
88
|
-
"q.feeds.sync.acquisitions": {"enabled": True, "ttl_ms": FIVE_MINUTES}
|
|
88
|
+
"q.feeds.sync.acquisitions": {"enabled": True, "ttl_ms": FIVE_MINUTES, "max_retries": 3}
|
|
89
89
|
}
|
|
90
90
|
)
|
|
91
91
|
|
talentro/services/rabbitmq.py
CHANGED
|
@@ -210,7 +210,7 @@ class QueueContext(metaclass=SingletonMeta):
|
|
|
210
210
|
def __init__(self):
|
|
211
211
|
self._rabbit_mq = RabbitMQ()
|
|
212
212
|
self._message_callbacks = []
|
|
213
|
-
self.
|
|
213
|
+
self._topology_configs: dict[str, TopologyConfig] = {} # Store all topologies
|
|
214
214
|
|
|
215
215
|
async def connect(self):
|
|
216
216
|
try:
|
|
@@ -227,7 +227,8 @@ class QueueContext(metaclass=SingletonMeta):
|
|
|
227
227
|
await self._setup_topology_with_config(topology)
|
|
228
228
|
|
|
229
229
|
async def _setup_topology_with_config(self, topology_config: TopologyConfig):
|
|
230
|
-
|
|
230
|
+
# Sla topology op met exchange_name als key
|
|
231
|
+
self._topology_configs[topology_config.exchange_name] = topology_config
|
|
231
232
|
|
|
232
233
|
await self._rabbit_mq.setup_topology(
|
|
233
234
|
topology_config.exchange_name,
|
|
@@ -237,15 +238,21 @@ class QueueContext(metaclass=SingletonMeta):
|
|
|
237
238
|
retry_config=topology_config.retry_config
|
|
238
239
|
)
|
|
239
240
|
|
|
240
|
-
|
|
241
|
-
|
|
241
|
+
|
|
242
|
+
async def start_consuming(self, queue: str, exchange_name: str):
|
|
243
|
+
topology_config = self._topology_configs.get(exchange_name)
|
|
244
|
+
|
|
245
|
+
if not topology_config:
|
|
246
|
+
raise ValueError(f"Topology not found for exchange: {exchange_name}")
|
|
247
|
+
|
|
248
|
+
max_retries = topology_config.get_max_retries(queue)
|
|
242
249
|
|
|
243
250
|
asyncio.create_task(
|
|
244
251
|
self._rabbit_mq.consume(
|
|
245
|
-
|
|
252
|
+
exchange_name,
|
|
246
253
|
queue,
|
|
247
254
|
self._on_new_message,
|
|
248
|
-
dlx_name=
|
|
255
|
+
dlx_name=topology_config.dlx_name,
|
|
249
256
|
max_retries=max_retries
|
|
250
257
|
)
|
|
251
258
|
)
|
|
@@ -22,14 +22,14 @@ talentro/integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
|
22
22
|
talentro/integrations/dataclasses.py,sha256=FxYbtglKvp_BAufQSCw-IO3wraJUuMvoKZnwJMd5W6w,4482
|
|
23
23
|
talentro/integrations/models.py,sha256=iNgmAahbonQj2EVd1776xcYzv-1mtAkzGvgDdbjocjo,1292
|
|
24
24
|
talentro/messaging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
|
-
talentro/messaging/topology.py,sha256=
|
|
25
|
+
talentro/messaging/topology.py,sha256=nw0_BBgYJqnL0XFjqeIoC123iPRWJeddPk8E6Y8hCzs,3284
|
|
26
26
|
talentro/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
27
|
talentro/services/billing.py,sha256=8pX57-tP7HyRqB_afB-CpEJXiZzMTJyjLyDI3vLvQsI,1989
|
|
28
28
|
talentro/services/caching.py,sha256=mmjhXAMJ_g8D8cJqn15YqZ7ST-G5lD9MS-PmlowI7pU,2921
|
|
29
29
|
talentro/services/clients.py,sha256=vluOrdYdDAQLyGR9-EmogLjA9OUlJtHy0tYD9LhwxKg,2174
|
|
30
30
|
talentro/services/db.py,sha256=cnKCrYG7GwIu7ZZhA25D-yaXaiCJqPpzfcanWquyrBY,822
|
|
31
31
|
talentro/services/google_storage.py,sha256=5r5uiDZD-76Dylc7yyRG5Ni4XNTc9xK8rC0glCRG8_8,6014
|
|
32
|
-
talentro/services/rabbitmq.py,sha256=
|
|
32
|
+
talentro/services/rabbitmq.py,sha256=7WYW94IAVWRg1utCDWG5BjsB8CTj-5m5_rspCTHxIyI,10995
|
|
33
33
|
talentro/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
34
34
|
talentro/util/attributes.py,sha256=PgJnn9LMtHkiNIaMov2HQt5944HweD6gRlAHBZrJGPA,448
|
|
35
35
|
talentro/util/enum.py,sha256=YftsoJKnrn8HAjA2Q1tqIYBMrNnlq6m1b34N8hfykbE,155
|
|
@@ -41,6 +41,6 @@ talentro/vacancies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
|
41
41
|
talentro/vacancies/dataclasses.py,sha256=E6H5fsZH4IwtBFSLDolzF6u39tEIrANtWiNVoB65P0c,15074
|
|
42
42
|
talentro/vacancies/models.py,sha256=GoXr71CNzU6csf8gdmv84etb3Rm-Cdfigp1yqPI_jjQ,4822
|
|
43
43
|
talentro/vacancies/taxanomy.py,sha256=B6DMq9Wbs0aXFwD9aZveSlLwAC9eq1iCO_KM-FmrV7M,6384
|
|
44
|
-
talentro_commons-0.20.
|
|
45
|
-
talentro_commons-0.20.
|
|
46
|
-
talentro_commons-0.20.
|
|
44
|
+
talentro_commons-0.20.5.dist-info/METADATA,sha256=1ROUYwJqviM43oHc9sta_CSOV6LgWsl2qFZFpDAOAHQ,1507
|
|
45
|
+
talentro_commons-0.20.5.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
46
|
+
talentro_commons-0.20.5.dist-info/RECORD,,
|
|
File without changes
|