Skip to content

Commit

Permalink
fix: naming processor_task > process_task
Browse files Browse the repository at this point in the history
  • Loading branch information
xadahiya committed Nov 1, 2024
1 parent 9a89893 commit d4bbfe5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions snapshotter/utils/aggregation_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def _gen_project_id(self, task_type, epoch):
else:
raise ValueError(f'Unknown project type {task_type}')

async def _processor_task(
async def _process_task(
self,
msg_obj: Union[PowerloomSnapshotSubmittedMessage, PowerloomCalculateAggregateMessage],
task_type: str,
Expand Down Expand Up @@ -336,7 +336,7 @@ async def _on_rabbitmq_message(self, message: IncomingMessage):
'Unknown task type {}', task_type,
)
return
await self._create_tracked_task(self._processor_task(msg_obj=msg_obj, task_type=task_type))
await self._create_tracked_task(self._process_task(msg_obj=msg_obj, task_type=task_type))

async def _init_project_calculation_mapping(self):
"""
Expand Down
4 changes: 2 additions & 2 deletions snapshotter/utils/delegate_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __init__(self, name, **kwargs):

self._q, self._rmq_routing = get_delegate_worker_request_queue_routing_key()

async def _processor_task(self, msg_obj: PowerloomDelegateWorkerRequestMessage):
async def _process_task(self, msg_obj: PowerloomDelegateWorkerRequestMessage):
"""
Process a delegate task for the given message object.
Expand Down Expand Up @@ -216,7 +216,7 @@ async def _on_rabbitmq_message(self, message: IncomingMessage):
return
# Start processing the task asynchronously
current_time = time.time()
task = asyncio.create_task(self._processor_task(msg_obj=msg_obj))
task = asyncio.create_task(self._process_task(msg_obj=msg_obj))
self._active_tasks.add((current_time, task))
task.add_done_callback(lambda _: self._active_tasks.discard((current_time, task)))

Expand Down

0 comments on commit d4bbfe5

Please sign in to comment.