From d4405a0cde1e829c701fa211272d11518730b536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Wed, 10 Apr 2024 12:55:07 +0200 Subject: [PATCH] Clear the detail when restarting tasks --- acid.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/acid.go b/acid.go index 978358f..afc3bca 100644 --- a/acid.go +++ b/acid.go @@ -374,7 +374,8 @@ func rpcRestart(w io.Writer, ids []int64) { // The executor bumps to "running" after inserting into gRunning, // so we should not need to exclude that state here. result, err := gDB.ExecContext(context.Background(), - `UPDATE task SET state = ? WHERE id = ?`, taskStateNew, id) + `UPDATE task SET state = ?, detail = '' WHERE id = ?`, + taskStateNew, id) if err != nil { fmt.Fprintf(w, "%d: %s\n", id, err) } else if n, _ := result.RowsAffected(); n != 1 {