Fix issues with rclone setup

This commit is contained in:
Mukhtar Akere
2025-08-07 05:31:07 +01:00
parent c620ba3d56
commit eba24c9d63
9 changed files with 108 additions and 105 deletions
+11
View File
@@ -6,6 +6,8 @@ import (
"github.com/sirrobot01/decypharr/cmd/decypharr"
"github.com/sirrobot01/decypharr/internal/config"
"log"
"net/http"
_ "net/http/pprof"
"os"
"os/signal"
"runtime/debug"
@@ -25,6 +27,15 @@ 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()