worker: simplify the POST in workerHeartbeat()
There is no actual payload when posting the worker status so let's just post `nil` instead of an empty `bytes.Buffer` to make this explicit.
This commit is contained in:
parent
802fbce596
commit
43c6bc7abc
1 changed files with 1 additions and 2 deletions
|
|
@ -228,8 +228,7 @@ func (c *Client) workerHeartbeat() {
|
|||
continue
|
||||
}
|
||||
|
||||
var buf bytes.Buffer
|
||||
resp, err := c.NewRequest("POST", url.String(), map[string]string{"Content-Type": "application/json"}, bytes.NewReader(buf.Bytes()))
|
||||
resp, err := c.NewRequest("POST", url.String(), map[string]string{"Content-Type": "application/json"}, nil)
|
||||
if err != nil {
|
||||
logrus.Errorf("Error updating worker status: %v", err)
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue