-
Notifications
You must be signed in to change notification settings - Fork 32
feat: add health check in temporal service and retry with exponential backoff for Temporal client #171
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
feat: add health check in temporal service and retry with exponential backoff for Temporal client #171
Changes from 4 commits
7a9e45e
cfe631c
9905419
40b5a78
f0c2e3a
10e246a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -423,6 +423,10 @@ func (c *JobHandler) GetJobTasks() { | |
| // Construct a query for workflows related to this project and job | ||
| query := fmt.Sprintf("WorkflowId between 'sync-%s-%d' and 'sync-%s-%d-~'", projectIDStr, job.ID, projectIDStr, job.ID) | ||
| // List workflows using the direct query | ||
| if c.tempClient == nil { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In if c.tempClient != nil {
}Here we are checking if c.tempClient == nil {
utils.ErrorResponse(&c.Controller, http.StatusInternalServerError, "Temporal client is not initialized")
return
}Can we make it consistent
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to avoid extra lines of code, at some places we not using response from function
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if c.tempClient == nil {
utils.ErrorResponse(&c.Controller, http.StatusInternalServerError, "Temporal client is not initialized")
return
}I mean we are throwing this error only in job, and not in source and destination. Just to make it consistent. |
||
| utils.ErrorResponse(&c.Controller, http.StatusInternalServerError, "Temporal client is not initialized") | ||
| return | ||
| } | ||
| resp, err := c.tempClient.ListWorkflow(context.Background(), &workflowservice.ListWorkflowExecutionsRequest{ | ||
| Query: query, | ||
| }) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.