wait little for submitt channel to update

This commit is contained in:
Robin Olsen
2026-03-05 12:30:50 +01:00
parent e94701001c
commit 372e5900ff

View File

@@ -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() {