Reorganized the code, moved more things to the new part
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
"music-server/internal/server"
|
||||
"music-server/pkg/conf"
|
||||
"music-server/pkg/db"
|
||||
"net/http"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
@@ -21,7 +21,7 @@ func gracefulShutdown(apiServer *http.Server, done chan bool) {
|
||||
<-ctx.Done()
|
||||
|
||||
log.Println("shutting down gracefully, press Ctrl+C again to force")
|
||||
conf.CloseDb()
|
||||
db.CloseDb()
|
||||
|
||||
// The context is used to inform the server it has 5 seconds to finish
|
||||
// the request it is currently handling
|
||||
|
||||
Reference in New Issue
Block a user