temporalio / temporalio/samples-typescript
[Bug] NestJS example uses incorrect worker shutdown
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 465
- Forks
- 148
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 11
Description
What are you really trying to do?
I am trying to get the Nest.js example to correctly shut down the worker on application termination (for both SIGINT and SIGTERM).
Describe the bug
In the example, the exchange-rates-worker.service.ts calls await this.worker.close();, which doesn't / no longer exists on Worker from @temporalio/worker.
Minimal Reproduction
See nestjs-exchange-rates/apps/worker/src/exchange-rates-worker/exchange-rates-worker.service.ts.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with nestjs-exchange-rates/apps/worker/src/exchange-rates-worker/exchange-rates-worker.service.ts and inspect the current @temporalio/worker shutdown API and application termination hooks. Update the example so worker shutdown works for both SIGINT and SIGTERM, then verify the service no longer calls the unavailable Worker.close method.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100