Final bug fixes
This commit is contained in:
11
main.go
11
main.go
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user