Skip to content

Commit

Permalink
scriptSummary: change key names to use consistent terms
Browse files Browse the repository at this point in the history
  • Loading branch information
martinlindhe committed Oct 28, 2021
1 parent 9286bf6 commit 3c8fba3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions script/scriptResult.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ type taskResult struct {
}

type scriptSummary struct {
Config string `yaml:"Config"`
Succeeded int `yaml:"Succeeded"`
Failed int `yaml:"Failed"`
Aborted int `yaml:"Aborted"`
Changes int `yaml:"Changes"`
TotalFunctionsRun int `yaml:"TotalFunctionsRun"`
TotalRunTime time.Duration `yaml:"TotalRunTime"`
Script string `yaml:"Script"`
Succeeded int `yaml:"Succeeded"`
Failed int `yaml:"Failed"`
Aborted int `yaml:"Aborted"`
Changes int `yaml:"Changes"`
TotalTasksRun int `yaml:"TotalTasksRun"`
TotalRunTime time.Duration `yaml:"TotalRunTime"`
}

const stampMicro = "15:04:05.000000"
Expand Down
14 changes: 7 additions & 7 deletions script/scriptRunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ func (r Runner) Run(ctx context.Context, scripts tasks.Scripts, globalAbortOnErr
}

result.Summary = scriptSummary{
Config: r.DataProvider.Path,
Succeeded: succeeded,
Failed: failed,
Aborted: aborted,
Changes: changes,
TotalFunctionsRun: tasksRun,
TotalRunTime: time.Since(scriptStart),
Script: r.DataProvider.Path,
Succeeded: succeeded,
Failed: failed,
Aborted: aborted,
Changes: changes,
TotalTasksRun: tasksRun,
TotalRunTime: time.Since(scriptStart),
}

y, err := yaml.Marshal(result)
Expand Down

0 comments on commit 3c8fba3

Please sign in to comment.