1
0
Fork 0

[golang] implement shipyards visits

This commit is contained in:
Julien Dessaux 2025-02-17 00:40:43 +01:00
parent 3cae67aea4
commit bd2fb50c81
Signed by: adyxax
GPG key ID: F92E51B86E07177E
15 changed files with 299 additions and 45 deletions

View file

@ -6,6 +6,7 @@ import (
"log/slog"
"os"
"os/signal"
"syscall"
"git.adyxax.org/adyxax/spacetraders/golang/pkg/agent"
"git.adyxax.org/adyxax/spacetraders/golang/pkg/api"
@ -23,7 +24,7 @@ func main() {
logger := slog.New(slog.NewJSONHandler(os.Stdout, opts))
slog.SetDefault(logger)
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer cancel()
db, err := database.NewDB(