8000 fix(api): do not compute stop from start but from last_execution (#3141) · ovh/cds@b8d0f82 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit b8d0f82

Browse files
bnjjjfsamin
authored andcommitted
fix(api): do not compute stop from start but from last_execution (#3141)
Signed-off-by: Benjamin Coenen <benjamin.coenen@corp.ovh.com>
1 parent e16208c commit b8d0f82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engine/api/purge/purge.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func stopRunsBlocked(db *gorp.DbMap) error {
126126
query := `SELECT workflow_run.id
127127
FROM workflow_run
128128
WHERE (workflow_run.status = $1 or workflow_run.status = $2 or workflow_run.status = $3)
129-
AND now() - workflow_run.start > interval '1 day'
129+
AND now() - workflow_run.last_execution > interval '1 day'
130130
LIMIT 30`
131131
ids := []struct {
132132
ID int64 `db:"id"`

0 commit comments

Comments
 (0)
0