Browse Source

En cours de développement

master
losyme 7 months ago
parent
commit
d5712b4cb6
  1. 2
      client/client.go
  2. 4
      client/endpoint.go

2
client/client.go

@ -89,7 +89,7 @@ func (c *Client) NextJob(namespace string) (*jw.Job, error) {
)
}
job, err := ep.nextJob(reqID)
job, err := ep.nextJob(reqID, namespace)
if err == nil {
return job, nil
}

4
client/endpoint.go

@ -99,12 +99,12 @@ func (ep *endpoint) createJob(reqID string, content []byte) (*jw.Job, error) {
return job, err
}
func (ep *endpoint) nextJob(reqID string) (*jw.Job, error) {
func (ep *endpoint) nextJob(reqID, namespace string) (*jw.Job, error) {
var job *jw.Job
err := request.
New(ep.URL).
Path("api/jobs").
Path("api/jobs/"+namespace).
Get().
BasicAuth(ep.Username, ep.Password).
ID(reqID).

Loading…
Cancel
Save