talentro-commons 0.20.8__tar.gz → 0.21.0__tar.gz
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_commons-0.20.8 → talentro_commons-0.21.0}/PKG-INFO +1 -1
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/pyproject.toml +1 -1
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/messaging/topology.py +2 -2
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/services/rabbitmq.py +11 -4
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/README.md +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/__init__.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/acquisition/__init__.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/acquisition/dataclasses.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/acquisition/models.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/billing/__init__.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/billing/dataclasses.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/billing/models.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/candidates/__init__.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/candidates/dataclasses.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/candidates/models.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/constants.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/event.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/exceptions.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/general/__init__.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/general/dataclasses.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/general/models.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/iam/__init__.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/iam/dataclasses.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/iam/models.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/iam/types.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/integrations/__init__.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/integrations/dataclasses.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/integrations/models.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/messaging/__init__.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/services/__init__.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/services/billing.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/services/caching.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/services/clients.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/services/db.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/services/google_storage.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/util/__init__.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/util/attributes.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/util/enum.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/util/files.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/util/singleton.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/util/string.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/util/vacancy.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/vacancies/__init__.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/vacancies/dataclasses.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/vacancies/models.py +0 -0
- {talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/vacancies/taxanomy.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "talentro-commons"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.21.0"
|
|
4
4
|
description = "This package contains all globally used code, services, models and data structures for Talentro"
|
|
5
5
|
authors = ["Emiel van Essen <emiel@marksmen.nl>"]
|
|
6
6
|
license = "Proprietary"
|
|
@@ -45,7 +45,7 @@ APPLICATIONS_TOPOLOGY = TopologyConfig(
|
|
|
45
45
|
bindings=[
|
|
46
46
|
# Integrations
|
|
47
47
|
("q.applications.raw.integrations", "applications.raw"),
|
|
48
|
-
("q.applications.
|
|
48
|
+
("q.applications.external.upsert.integrations", "applications.send"),
|
|
49
49
|
|
|
50
50
|
# Acquisitions
|
|
51
51
|
("q.applications.saved.acquisitions", "applications.saved"),
|
|
@@ -61,7 +61,7 @@ APPLICATIONS_TOPOLOGY = TopologyConfig(
|
|
|
61
61
|
retry_config={
|
|
62
62
|
# Integrations
|
|
63
63
|
"q.applications.raw.integrations": {"enabled": True, "ttl_ms": FIVE_MINUTES, "max_retries": 3},
|
|
64
|
-
"q.applications.
|
|
64
|
+
"q.applications.external.upsert.integrations": {"enabled": True, "ttl_ms": FIVE_MINUTES, "max_retries": 3},
|
|
65
65
|
|
|
66
66
|
# Acquisitions
|
|
67
67
|
"q.applications.saved.acquisitions": {"enabled": True, "ttl_ms": FIVE_MINUTES, "max_retries": 3},
|
|
@@ -141,18 +141,25 @@ class RabbitMQ:
|
|
|
141
141
|
traceback.print_exc()
|
|
142
142
|
|
|
143
143
|
# Get retry count from headers
|
|
144
|
-
x_death = message.headers.get('x-death'
|
|
145
|
-
death_count =
|
|
144
|
+
x_death = message.headers.get('x-death')
|
|
145
|
+
death_count = 0
|
|
146
|
+
|
|
147
|
+
if isinstance(x_death, dict):
|
|
148
|
+
death_count = x_death.get('count', 0)
|
|
149
|
+
elif isinstance(x_death, list) and len(x_death) > 0:
|
|
150
|
+
death_count = x_death[0].get('count', 0)
|
|
146
151
|
|
|
147
152
|
print(f" RabbitMQ ({queue}) - Retry attempt {death_count + 1}/{max_retries + 1}")
|
|
148
153
|
|
|
149
154
|
if death_count >= max_retries:
|
|
150
155
|
print(f" RabbitMQ ({queue}) - ❌ Max retries ({max_retries}) exceeded. Sending to DLQ.")
|
|
156
|
+
await message.nack(requeue=False)
|
|
151
157
|
else:
|
|
152
158
|
print(f" RabbitMQ ({queue}) - Sending to retry queue...")
|
|
159
|
+
retry_exchange = await self.channel.get_exchange(f"{dlx_name}.retry")
|
|
160
|
+
await retry_exchange.publish(message, routing_key=f"{queue}.dead")
|
|
161
|
+
await message.ack()
|
|
153
162
|
|
|
154
|
-
# Nack outside of any context manager
|
|
155
|
-
await message.nack(requeue=False)
|
|
156
163
|
message_processed = True
|
|
157
164
|
|
|
158
165
|
except (aio_pika.exceptions.AMQPConnectionError, aio_pika.exceptions.ChannelClosed):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{talentro_commons-0.20.8 → talentro_commons-0.21.0}/src/talentro/integrations/dataclasses.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|