Skip to content

Commit

Permalink
Log task processing in sync executor
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasst committed Jun 20, 2024
1 parent 2d48d8e commit 8dfcfe8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tasktiger/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,8 @@ def execute(
locks: Collection[Lock],
queue_lock: Optional[Semaphore],
) -> bool:
assert tasks

# Run heartbeat thread.
all_task_ids = {task.id for task in tasks}
stop_event = threading.Event()
Expand All @@ -433,6 +435,15 @@ def execute(
)
heartbeat_thread.start()

serialized_task_func = tasks[0].serialized_func
for task in tasks:
log.info(
"processing",
func=serialized_task_func,
task_id=task.id,
params={"args": task.args, "kwargs": task.kwargs},
)

# Run the tasks.
try:
result = self.execute_tasks(tasks, log)
Expand Down

0 comments on commit 8dfcfe8

Please sign in to comment.