talentro-commons 0.20.6__tar.gz → 0.20.8__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.
Files changed (46) hide show
  1. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/PKG-INFO +1 -1
  2. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/pyproject.toml +1 -1
  3. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/services/rabbitmq.py +16 -12
  4. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/README.md +0 -0
  5. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/__init__.py +0 -0
  6. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/acquisition/__init__.py +0 -0
  7. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/acquisition/dataclasses.py +0 -0
  8. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/acquisition/models.py +0 -0
  9. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/billing/__init__.py +0 -0
  10. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/billing/dataclasses.py +0 -0
  11. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/billing/models.py +0 -0
  12. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/candidates/__init__.py +0 -0
  13. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/candidates/dataclasses.py +0 -0
  14. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/candidates/models.py +0 -0
  15. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/constants.py +0 -0
  16. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/event.py +0 -0
  17. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/exceptions.py +0 -0
  18. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/general/__init__.py +0 -0
  19. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/general/dataclasses.py +0 -0
  20. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/general/models.py +0 -0
  21. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/iam/__init__.py +0 -0
  22. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/iam/dataclasses.py +0 -0
  23. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/iam/models.py +0 -0
  24. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/iam/types.py +0 -0
  25. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/integrations/__init__.py +0 -0
  26. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/integrations/dataclasses.py +0 -0
  27. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/integrations/models.py +0 -0
  28. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/messaging/__init__.py +0 -0
  29. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/messaging/topology.py +0 -0
  30. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/services/__init__.py +0 -0
  31. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/services/billing.py +0 -0
  32. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/services/caching.py +0 -0
  33. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/services/clients.py +0 -0
  34. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/services/db.py +0 -0
  35. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/services/google_storage.py +0 -0
  36. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/util/__init__.py +0 -0
  37. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/util/attributes.py +0 -0
  38. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/util/enum.py +0 -0
  39. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/util/files.py +0 -0
  40. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/util/singleton.py +0 -0
  41. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/util/string.py +0 -0
  42. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/util/vacancy.py +0 -0
  43. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/vacancies/__init__.py +0 -0
  44. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/vacancies/dataclasses.py +0 -0
  45. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/vacancies/models.py +0 -0
  46. {talentro_commons-0.20.6 → talentro_commons-0.20.8}/src/talentro/vacancies/taxanomy.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: talentro-commons
3
- Version: 0.20.6
3
+ Version: 0.20.8
4
4
  Summary: This package contains all globally used code, services, models and data structures for Talentro
5
5
  License: Proprietary
6
6
  Author: Emiel van Essen
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "talentro-commons"
3
- version = "0.20.6"
3
+ version = "0.20.8"
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"
@@ -95,9 +95,9 @@ class RabbitMQ:
95
95
  durable=True,
96
96
  arguments=retry_queue_args
97
97
  )
98
- await retry_queue.bind(retry_exchange, routing_key=f"{queue_name}.retry")
98
+ await retry_queue.bind(retry_exchange, routing_key=f"{queue_name}.dead")
99
99
  print(f" RabbitMQ - Retry queue enabled: {retry_queue.name} "
100
- f"(TTL: {ttl_ms}ms)")
100
+ f"(TTL: {ttl_ms * 0.001} seconds)")
101
101
 
102
102
  async def consume(
103
103
  self,
@@ -124,15 +124,17 @@ class RabbitMQ:
124
124
  await queue_object.bind(exchange, routing_key=queue)
125
125
 
126
126
  async for message in queue_object:
127
+ message_processed = False
127
128
  try:
128
- # Use ignore_processed=True to prevent auto-ack on successful processing
129
- async with message.process(ignore_processed=True, requeue=False):
130
- event: Event = Event.decode(message.body)
131
- print(
132
- f" RabbitMQ ({queue}) - [x] Received event: {event.meta.event_type} (trace: {event.meta.trace_id})")
133
- await callback(queue, event)
134
- # If we reach here, callback succeeded - manually ack
135
- await message.ack()
129
+ event: Event = Event.decode(message.body)
130
+ print(
131
+ f" RabbitMQ ({queue}) - [x] Received event: {event.meta.event_type} (trace: {event.meta.trace_id})")
132
+ await callback(queue, event)
133
+
134
+ # If we reach here, callback succeeded - manually ack
135
+ await message.ack()
136
+ message_processed = True
137
+
136
138
  except Exception as e:
137
139
  # Handle callback exception - send to retry queue
138
140
  print(f" RabbitMQ ({queue}) - ⚠️ Error processing message: {e}")
@@ -146,10 +148,12 @@ class RabbitMQ:
146
148
 
147
149
  if death_count >= max_retries:
148
150
  print(f" RabbitMQ ({queue}) - ❌ Max retries ({max_retries}) exceeded. Sending to DLQ.")
149
- await message.nack(requeue=False)
150
151
  else:
151
152
  print(f" RabbitMQ ({queue}) - Sending to retry queue...")
152
- await message.nack(requeue=False)
153
+
154
+ # Nack outside of any context manager
155
+ await message.nack(requeue=False)
156
+ message_processed = True
153
157
 
154
158
  except (aio_pika.exceptions.AMQPConnectionError, aio_pika.exceptions.ChannelClosed):
155
159
  print(f" RabbitMQ - Connection lost while consuming {queue}. Retrying in 5 seconds...")