summaryrefslogtreecommitdiff
path: root/backend-go/fix_main.patch
diff options
context:
space:
mode:
authorkboz <kutayboz@gmail.com>2026-09-27 22:36:34 +0200
committerkboz <kutayboz@gmail.com>2026-09-27 22:36:34 +0200
commit1b59961ce2385252e3346ea6107b15a2c1feafe6 (patch)
treefbe9e0cb968c47cff353e937e4dc835a64058c60 /backend-go/fix_main.patch
parent29c4b57db9a34e0f815d93cac6a2cae543778a93 (diff)
downloadhaul-1b59961ce2385252e3346ea6107b15a2c1feafe6.tar.gz
feat(backend): port route-planning backend to Go
Add a Go implementation mirroring the Python pipeline (loader, graph, pathfinder, arbitrage, market, route, manager) under internal/core, with ESI client/API integration and setup endpoints. Reuses backend/src as the working directory so existing data/cache paths keep working.
Diffstat (limited to 'backend-go/fix_main.patch')
-rw-r--r--backend-go/fix_main.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/backend-go/fix_main.patch b/backend-go/fix_main.patch
new file mode 100644
index 0000000..0cb9ed2
--- /dev/null
+++ b/backend-go/fix_main.patch
@@ -0,0 +1,28 @@
+--- /home/kboz/eve_haul/backend-go/cmd/eve_haul_go/main.go
++++ /home/kboz/eve_haul/backend-go/cmd/eve_haul_go/main.go
+@@ -115,8 +115,19 @@
+ Handler: mux,
+ }
+
+-log.Println("Listening on :8000")
+-if err := server.ListenAndServe(); err != nil {
+-log.Fatalf("Server failed: %v", err)
+-}
++go func() {
++log.Println("Listening on :8000")
++if err := server.ListenAndServe(); err != nil && err != http.ErrServerClosed {
++log.Fatalf("Server failed: %v", err)
++}
++}()
++
++quit := make(chan os.Signal, 1)
++signal.Notify(quit, os.Interrupt, syscall.SIGTERM)
++<-quit
++log.Println("\nShutting down server...")
++
++ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
++defer cancel()
++server.Shutdown(ctx)
+ }
+
+ func isSetupReady() (bool, bool) {