Final bug fixes

This commit is contained in:
Mukhtar Akere
2025-08-09 19:57:32 +01:00
parent 3aeb806033
commit 0dd1efb07c
10 changed files with 21 additions and 42 deletions

11
main.go
View File

@@ -6,8 +6,6 @@ import (
"github.com/sirrobot01/decypharr/cmd/decypharr"
"github.com/sirrobot01/decypharr/internal/config"
"log"
"net/http"
_ "net/http/pprof"
"os"
"os/signal"
"runtime/debug"
@@ -27,15 +25,6 @@ func main() {
config.SetConfigPath(configPath)
config.Get()
if os.Getenv("ENABLE_PPROF") == "true" {
go func() {
log.Println("Starting pprof server on :6060")
if err := http.ListenAndServe(":6060", nil); err != nil {
log.Printf("pprof server error: %v", err)
}
}()
}
// Create a context canceled on SIGINT/SIGTERM
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()