From 38669ce2ed53ce44d7d794bc40b8a40fc60ee246 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Wed, 10 Apr 2024 15:03:26 +0200 Subject: Notify Gitea about restarted tasks --- acid.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'acid.go') diff --git a/acid.go b/acid.go index afc3bca..280323c 100644 --- a/acid.go +++ b/acid.go @@ -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() } -- cgit v1.2.3-70-g09d2