diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2024-04-10 12:55:07 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-04-10 12:55:07 +0200 |
commit | d4405a0cde1e829c701fa211272d11518730b536 (patch) | |
tree | 157385fe88a8b916f066f69f6d67591552e763a1 | |
parent | 274e71fb6a99c957ab433aeca68071ba74f9bcb0 (diff) | |
download | acid-d4405a0cde1e829c701fa211272d11518730b536.tar.gz acid-d4405a0cde1e829c701fa211272d11518730b536.tar.xz acid-d4405a0cde1e829c701fa211272d11518730b536.zip |
Clear the detail when restarting tasks
-rw-r--r-- | acid.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 { |