medusa icon indicating copy to clipboard operation
medusa copied to clipboard

chore: medusa shutdown

Open adrien2p opened this issue 1 year ago • 4 comments

[WIP]

What

  • include a new shutdown function returned by medusa loader that should clean up internal resources if needed.
  • include onApplicationShutdown hook for the module to have medusa app handling shutdown properly and allow any modules to hook themself to clean up potential resources if needed

NOTE We can rework the naming if necessary

NOTE Now, when running the tests with medusaTestRunner there is no more open handles after the tests finishes, meaning that we shouldn't have any open tcp left and no need for forceExit.

Same for graceful shutdown, and if any users consume our shutdown, the result should be the same

adrien2p avatar Mar 28 '24 14:03 adrien2p

🦋 Changeset detected

Latest commit: 64f8aaeba8405ab6d76ef50cb2cb5ff73abad062

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@medusajs/medusa Patch
@medusajs/cache-redis Patch
@medusajs/event-bus-redis Patch
medusa-test-utils Patch
@medusajs/modules-sdk Patch
@medusajs/types Patch
@medusajs/workflow-engine-redis Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Mar 28 '24 14:03 changeset-bot[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 29, 2024 11:53am
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Mar 29, 2024 11:53am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Mar 29, 2024 11:53am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Mar 29, 2024 11:53am

vercel[bot] avatar Mar 28 '24 14:03 vercel[bot]

/snapshot-this

adrien2p avatar Mar 28 '24 17:03 adrien2p

:rocket: A snapshot release has been made for this PR

Test the snapshots by updating your package.json with the newly published versions:

yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add [email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]
yarn add @medusajs/[email protected]

Latest commit: 45c49e89f28123ef622fc1c07253bae94fd74875

github-actions[bot] avatar Mar 28 '24 21:03 github-actions[bot]

/snapshot-this

srindom avatar Mar 29 '24 08:03 srindom

I believe it is already a very good start

adrien2p avatar Mar 29 '24 10:03 adrien2p