This repository has been archived by the owner on Oct 18, 2022. It is now read-only.
Add service class interface with helper methods #21
Labels
discovery
more information is needed
feature
New feature or request
package/core
issues related to @kangojs/core
Package Information: core
Describe your feature
Add a base service class interface which has the methods
async onStart()
andasync onKill()
. These are like "hook functions" which KangoJS can call at certain points of the application lifecycle.onStart
- called once the application is setup and ready. This could be used for things like starting up cron tasks etconKill
- called when the application is being killed. This can be used for clean up such as closing connections to the database/Redis etcIs your suggestion related to any problems?
For testing I need to manually fetch all services that require clean up and handle each one.
Having a built in way to handle this would make it easier when multiple services need clean up.
Additional context
n/a
The text was updated successfully, but these errors were encountered: