Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why there is no signal passed to final handler? #26

Open
jougene opened this issue Jan 19, 2024 · 0 comments
Open

Why there is no signal passed to final handler? #26

jougene opened this issue Jan 19, 2024 · 0 comments

Comments

@jougene
Copy link

jougene commented Jan 19, 2024

Issue Type

It would be better if we have signal in funally handler

Expected behavior

  • we have signal in finally callback with proper logging on the application side

Actual behavior

  • no signal in finally callback

Steps to reproduce the problem

  • code example
    gracefulShutdown(app.server, {
      onShutdown: async signal => {
        logger.info('Handle shutdown: Started', { signal })

        await actual.stop()

        logger.info('Handle shutdown: App shutdown done', { signal })
      },
      finally: async signal => {
        logger.info('Handle shutdown: Active handles', {
          handles: process._getActiveHandles().map(handle => handle.constructor.name)
        })

        logger.info('Handle shutdown: Completed', { signal })
      }
    })

Specifications

  • package version: http-graceful-shutdown@3.1.13
  • operating system: MacOS Ventura 13.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant