temporalio / temporalio/samples-typescript

[Bug] NestJS example uses incorrect worker shutdown

Open
#377 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.