Task Log display

This commit is contained in:
Samuel Lorch 2024-05-09 04:49:46 +02:00
parent f31fdfd3b5
commit 7a0564a210
4 changed files with 143 additions and 12 deletions

View file

@ -74,7 +74,8 @@ func Start(_conf config.Config, tmplFS embed.FS, staticFS embed.FS, migrationsFS
mux := http.NewServeMux()
mux.HandleFunc("/worker", handleWorkerWebsocket)
mux.Handle("/static/", fs)
mux.HandleFunc("/tasks", handleTask)
mux.HandleFunc("/tasks", handleTasks)
mux.HandleFunc("/tasks/{id}", handleTask)
mux.HandleFunc("/scan/{id}", handleScan)
mux.HandleFunc("/libraries/{id}", handleLibrary)
mux.HandleFunc("/libraries", handleLibraries)
@ -102,7 +103,7 @@ func Start(_conf config.Config, tmplFS embed.FS, staticFS embed.FS, migrationsFS
}()
stopCleanup := make(chan bool, 1)
go cleanupDeadWorkers(stopCleanup)
go manageWorkers(stopCleanup)
sigs := make(chan os.Signal, 1)
signal.Notify(sigs, os.Interrupt)