Skip to content

Commit

Permalink
fix: save start time of an action pushed by an agent (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe authored Feb 8, 2024
1 parent d98c66e commit a15a9fc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions upstream/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,11 @@ func InsertUpstreamMsg(ctx context.Context, req *PushData) error {

for i := range req.PlaybookActions {
updates := map[string]any{
"result": req.PlaybookActions[i].Result,
"end_time": req.PlaybookActions[i].EndTime,
"status": req.PlaybookActions[i].Status,
"error": req.PlaybookActions[i].Error,
"result": req.PlaybookActions[i].Result,
"start_time": req.PlaybookActions[i].StartTime,
"end_time": req.PlaybookActions[i].EndTime,
"status": req.PlaybookActions[i].Status,
"error": req.PlaybookActions[i].Error,
}
if err := db.Model(&models.PlaybookRunAction{}).Where("id = ?", req.PlaybookActions[i].ID).Updates(updates).Error; err != nil {
return fmt.Errorf("error updating playbook action [%s]: %w", req.PlaybookActions[i].ID, err)
Expand Down

0 comments on commit a15a9fc

Please sign in to comment.