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

Provide startup/teardown hooks #539

Closed
ejizba opened this issue Feb 17, 2022 · 1 comment
Closed

Provide startup/teardown hooks #539

ejizba opened this issue Feb 17, 2022 · 1 comment
Assignees
Labels
enhancement P2 v4 model 🚀 Related to the new V4 programming model
Milestone

Comments

@ejizba
Copy link
Contributor

ejizba commented Feb 17, 2022

Related to #522, which is focused on invocation hooks (needed for distributed tracing), there is benefit to startup & teardown hooks as well

A few differences between putting code at the top level of the startup file vs. a startup hook:

  1. Startup hooks can use await (commonjs files don't support top level await, although es6 does)
  2. Startup hooks can be passed a context object with extra information about the worker
@hossam-nasr
Copy link
Contributor

Startup hooks added in #577. Teardown hooks tracked by #606. Closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement P2 v4 model 🚀 Related to the new V4 programming model
Projects
None yet
Development

No branches or pull requests

2 participants