mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-18 01:11:26 +03:00
refactor: graceful shutdown for server (#482)
This commit is contained in:
committed by
GitHub
parent
ce24372c57
commit
3ec98736cf
@@ -6,10 +6,12 @@ import (
|
||||
_ "github.com/golang-migrate/migrate/v4/source/file"
|
||||
|
||||
"github.com/pocket-id/pocket-id/backend/internal/service"
|
||||
"github.com/pocket-id/pocket-id/backend/internal/utils/signals"
|
||||
)
|
||||
|
||||
func Bootstrap() {
|
||||
ctx := context.TODO()
|
||||
// Get a context that is canceled when the application is stopping
|
||||
ctx := signals.SignalContext(context.Background())
|
||||
|
||||
initApplicationImages()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user