Skip to content

Commit

Permalink
chore: revert 27b9aa53d98035c9cbf8a5f96c9b18c15e51e4cay
Browse files Browse the repository at this point in the history
  • Loading branch information
xadahiya committed Oct 25, 2024
1 parent b1bfd36 commit 2b35c25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions snapshotter/utils/aggregation_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ async def _on_rabbitmq_message(self, message: IncomingMessage):
task_type = message.routing_key.split('.')[-1]
if task_type not in self._task_types:
return
await message.ack()

await self.init_worker()

Expand Down Expand Up @@ -336,9 +337,6 @@ async def _on_rabbitmq_message(self, message: IncomingMessage):
)
return
await self._create_tracked_task(self._processor_task(msg_obj=msg_obj, task_type=task_type))
# sleep for 0.3 second
await asyncio.sleep(0.3)
await message.ack()

async def _init_project_calculation_mapping(self):
"""
Expand Down
4 changes: 1 addition & 3 deletions snapshotter/utils/snapshot_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ async def _on_rabbitmq_message(self, message: IncomingMessage):
task_type = message.routing_key.split('.')[-1]
if task_type not in self._task_types:
return
await message.ack()

await self.init_worker()

Expand Down Expand Up @@ -402,9 +403,6 @@ async def _on_rabbitmq_message(self, message: IncomingMessage):

# Start the processor task
await self._create_tracked_task(self._process_task(msg_obj=msg_obj, task_type=task_type))
# sleep for 0.3 second
await asyncio.sleep(0.3)
await message.ack()

async def _init_project_calculation_mapping(self):
"""
Expand Down

0 comments on commit 2b35c25

Please sign in to comment.