aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/game/hub.go
diff options
context:
space:
mode:
Diffstat (limited to 'backend/game/hub.go')
-rw-r--r--backend/game/hub.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/backend/game/hub.go b/backend/game/hub.go
index 910911a..9ae725a 100644
--- a/backend/game/hub.go
+++ b/backend/game/hub.go
@@ -2,7 +2,8 @@ package game
import (
"context"
- "log"
+ "log/slog"
+ "os"
"regexp"
"strings"
@@ -29,7 +30,8 @@ func NewGameHub(q *db.Queries, taskQueue *taskqueue.Queue, taskWorker *taskqueue
func (hub *Hub) Run() {
go func() {
if err := hub.taskWorker.Run(); err != nil {
- log.Fatal(err)
+ slog.Error("task worker failed", "error", err)
+ os.Exit(1)
}
}()