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

Added logic for Periodically checks if the workers are running, and restarts them if necessary. #331

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

manu-govind
Copy link
Contributor

Restart all registered workers.

…estarts them if necessary.

Restart all registered workers.
Copy link

@@ -39,10 +42,24 @@ class WorkflowEngine(private val temporalConfig: TemporalConfig) {

private val healthCheckSystem = HealthCheckTemporalServer(temporalConfig)

private var factory: WorkerFactory? = null
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggest to use lateinit qualifier on factory to avoid nullability and double bangs in the code below.
https://kotlinlang.org/docs/properties.html#late-initialized-properties-and-variables

* Restart all registered workers.
*/
private fun restartWorkers() {
initializeTemporalClient()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wasn't the temporal client already initialized in the init block?

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.

2 participants