Skip to content

Commit

Permalink
Address some feedback from #45
Browse files Browse the repository at this point in the history
Specifically, add the `task_id` to log lines in the runner so we can figure out how long tasks are taking from the log output.
  • Loading branch information
bcspragu committed Nov 7, 2023
1 parent 2606745 commit 5cbf241
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/runner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ func run(args []string) error {
return fmt.Errorf("unknown task type %q", taskType)
}

logger.Info("running PACTA task", zap.String("task_type", string(taskType)))
logger.Info("running PACTA task", zap.String("task_id", string(taskID)), zap.String("task_type", string(taskType)))

if err := taskFn(ctx, taskID); err != nil {
return fmt.Errorf("error running task: %w", err)
}

logger.Info("ran PACTA task successfully", zap.String("task_type", string(taskType)))
logger.Info("ran PACTA task successfully", zap.String("task_id", string(taskID)), zap.String("task_type", string(taskType)))

return nil
}
Expand Down

0 comments on commit 5cbf241

Please sign in to comment.