diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2024-04-10 15:03:26 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-04-10 15:03:26 +0200 |
commit | 38669ce2ed53ce44d7d794bc40b8a40fc60ee246 (patch) | |
tree | 9139568ac6258637af9a605a03848523fe1bb72a /acid.go | |
parent | d4405a0cde1e829c701fa211272d11518730b536 (diff) | |
download | acid-38669ce2ed53ce44d7d794bc40b8a40fc60ee246.tar.gz acid-38669ce2ed53ce44d7d794bc40b8a40fc60ee246.tar.xz acid-38669ce2ed53ce44d7d794bc40b8a40fc60ee246.zip |
Notify Gitea about restarted tasks
Diffstat (limited to 'acid.go')
-rw-r--r-- | acid.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -373,8 +373,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 = ?, detail = '' WHERE id = ?`, + result, err := gDB.ExecContext(context.Background(), `UPDATE task + SET state = ?, detail = '', notified = 0 WHERE id = ?`, taskStateNew, id) if err != nil { fmt.Fprintf(w, "%d: %s\n", id, err) @@ -382,6 +382,7 @@ func rpcRestart(w io.Writer, ids []int64) { fmt.Fprintf(w, "%d: no such task\n", id) } } + notifierAwaken() executorAwaken() } |