feat(worker): support graceful shutdown (#459)
* feat(worker): support graceful shutdown notifications workers and queue have been sent to APNs/FCM before shutdown a push notification. send buffered channel to signal.Notify to avoid blocking see: golang/lint#175 fixed: https://github.com/appleboy/gorush/issues/441 Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
@@ -100,7 +100,7 @@ func (s *Server) Send(ctx context.Context, in *proto.NotificationRequest) (*prot
|
||||
// RunGRPCServer run gorush grpc server
|
||||
func RunGRPCServer() error {
|
||||
if !gorush.PushConf.GRPC.Enabled {
|
||||
gorush.LogAccess.Debug("gRPC server is disabled.")
|
||||
gorush.LogAccess.Info("gRPC server is disabled.")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user