summaryrefslogtreecommitdiff
path: root/internal/executor/executor.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/executor/executor.go')
-rw-r--r--internal/executor/executor.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/executor/executor.go b/internal/executor/executor.go
index 7674fe6..fd37c33 100644
--- a/internal/executor/executor.go
+++ b/internal/executor/executor.go
@@ -29,6 +29,7 @@ type Store interface {
UpdateTaskSummary(taskID, summary string) error
AppendTaskInteraction(taskID string, interaction task.Interaction) error
UpdateTaskAgent(id string, agent task.AgentConfig) error
+ UpdateExecutionChangestats(execID string, stats *task.Changestats) error
}
// LogPather is an optional interface runners can implement to provide the log
@@ -352,6 +353,13 @@ func (p *Pool) handleRunResult(ctx context.Context, t *task.Task, exec *storage.
p.logger.Error("failed to update task summary", "taskID", t.ID, "error", summaryErr)
}
}
+ if exec.StdoutPath != "" {
+ if cs := task.ParseChangestatFromFile(exec.StdoutPath); cs != nil {
+ if csErr := p.store.UpdateExecutionChangestats(exec.ID, cs); csErr != nil {
+ p.logger.Error("failed to store changestats", "execID", exec.ID, "error", csErr)
+ }
+ }
+ }
if updateErr := p.store.UpdateExecution(exec); updateErr != nil {
p.logger.Error("failed to update execution", "error", updateErr)
}