new payment methods service
This commit is contained in:
16
api/payments/methods/internal/server/internal/lifecycle.go
Normal file
16
api/payments/methods/internal/server/internal/lifecycle.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package serverimp
|
||||
|
||||
import "context"
|
||||
|
||||
func (i *Imp) shutdownApp() {
|
||||
if i == nil || i.app == nil {
|
||||
return
|
||||
}
|
||||
|
||||
timeout := i.config.Runtime.ShutdownTimeout()
|
||||
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
||||
defer cancel()
|
||||
|
||||
i.app.Shutdown(ctx)
|
||||
i.app = nil
|
||||
}
|
||||
Reference in New Issue
Block a user