From 372e5900ff6b56e4a8bf390b22995e1c37752d85 Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Thu, 5 Mar 2026 12:30:50 +0100 Subject: [PATCH] wait little for submitt channel to update --- pkg/web/handler/task.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pkg/web/handler/task.go b/pkg/web/handler/task.go index dab8086..08984bb 100644 --- a/pkg/web/handler/task.go +++ b/pkg/web/handler/task.go @@ -4,6 +4,7 @@ import ( "context" "io" "net/http" + "time" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/pkg/web/components" @@ -24,12 +25,8 @@ func SetSubmitChan(ch chan<- struct{}) { } func HandleTaskStatus(w http.ResponseWriter, r *http.Request) { - if submitChan != nil { - select { - case submitChan <- struct{}{}: - default: - } - } + submitChan <- struct{}{} + time.Sleep(100 * time.Millisecond) hx := HTMX(r) if hx.IsHxRequest() {