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

Fix workflow run promise awaiting, so that workers exit cleanly #56

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tetrakatech
Copy link

Per https://community.temporal.io/t/connection-retry-for-temporal/10992 and https://typescript.temporal.io/api/classes/worker.Worker#run, the API for worker exits is:

  • Call this.worker.shutdown
  • Wait for the promise originally returned by worker.run() to return, handling errors appropriately

this.clearInterval();
}
}, 1000);
this.workerRunPromise = this.worker?.run();
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per https://docs.nestjs.com/fundamentals/lifecycle-events, onModuleInit is called before onApplicationBootstrap, and no other code calls .explore in this repo, so I don't think it can be set at a later time with any of the publicly described interfaces, but I can reinstate this timer if it is needed for some reason

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

Successfully merging this pull request may close these issues.

1 participant