Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Updated go client to only include domain param when given (#1976)
Browse files Browse the repository at this point in the history
* Updated Ack method to only include the "domain" param if explicitly requested

* Updated PollForTask method to only include the "domain" param if explicitly requested

* Updated logging

* Removed unnecessary log statements
  • Loading branch information
djcass44 committed Dec 1, 2020
1 parent cc1f322 commit 181c2df
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions client/go/conductorhttpclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ func (c *ConductorHttpClient) PollForTask(taskType string, workerid string, doma
url := c.httpClient.MakeUrl("/tasks/poll/{taskType}", "{taskType}", taskType)
params := map[string]string{
"workerid": workerid,
"domain": domain,
}
// only add the domain if requested, otherwise conductor will silently fail (https://github.com/Netflix/conductor/issues/1952)
if domain != "" {
params["domain"] = domain
}
outputString, err := c.httpClient.Get(url, params, nil)
if err != nil {
Expand All @@ -207,7 +210,10 @@ func (c *ConductorHttpClient) AckTask(taskId, workerid, domain string) (string,
url := c.httpClient.MakeUrl("/tasks/{taskId}/ack", "{taskId}", taskId)
params := map[string]string{
"workerid": workerid,
"domain": domain,
}
// only add the domain if requested, otherwise conductor will silently fail (https://github.com/Netflix/conductor/issues/1952)
if domain != "" {
params["domain"] = domain
}
headers := map[string]string{"Accept": "application/json"}
outputString, err := c.httpClient.Post(url, params, headers, "")
Expand Down

0 comments on commit 181c2df

Please sign in to comment.