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

Teminus hook does not get executed as in documentation example #2086

Closed
1 task
ostridm opened this issue Sep 14, 2022 · 3 comments · Fixed by #2088
Closed
1 task

Teminus hook does not get executed as in documentation example #2086

ostridm opened this issue Sep 14, 2022 · 3 comments · Fixed by #2088

Comments

@ostridm
Copy link

ostridm commented Sep 14, 2022

Information

  • Version: 6.128.10
  • Packages: @tsed/terminus

Teminus hook does not get executed due to an extra prepending $ sign when event is emitted.

beforeShutdown: this.createEmitter("$beforeShutdown"),

return this.injector.emit(`$${name}`, ...args);

Example

terminus: {
  sendFailuresDuringShutdown: true,
  useExit0: true,
  signal: 'SIGTERM',
}
import {Injectable} from "@tsed/di";

@Injectable()
class RedisCtrl {
  $beforeShutdown() {
    console.log("called before shutdown");
  }
}

Acceptance criteria

  • Terminus hook executed
@github-actions
Copy link

🎉 Are you happy?

If you appreciated the support, know that it is free and is carried out on personal time ;)

A support, even a little bit makes a difference for me and continues to bring you answers!

github opencollective

@Romakita
Copy link
Collaborator

🎉 This issue has been resolved in version 6.132.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Romakita
Copy link
Collaborator

Romakita commented Oct 4, 2022

🎉 This issue has been resolved in version 7.0.0-rc.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants