Skip to content

Commit

Permalink
fix(api): do not compute stop from start but from last_execution (#3141)
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Coenen <[email protected]>
  • Loading branch information
bnjjj authored and fsamin committed Aug 6, 2018
1 parent e16208c commit b8d0f82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/api/purge/purge.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func stopRunsBlocked(db *gorp.DbMap) error {
query := `SELECT workflow_run.id
FROM workflow_run
WHERE (workflow_run.status = $1 or workflow_run.status = $2 or workflow_run.status = $3)
AND now() - workflow_run.start > interval '1 day'
AND now() - workflow_run.last_execution > interval '1 day'
LIMIT 30`
ids := []struct {
ID int64 `db:"id"`
Expand Down

0 comments on commit b8d0f82

Please sign in to comment.