GetJobSummary API (#8)

* Adds GetJobSummary API
This commit is contained in:
lenhattan86 2021-01-12 16:18:09 -08:00 committed by GitHub
parent 755f99fb76
commit b1661698c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 61 additions and 0 deletions

View file

@ -348,6 +348,19 @@ func (c *Client) GetJobUpdateSummaries(jobUpdateQuery *aurora.JobUpdateQuery) (*
return resp.GetResult_().GetGetJobUpdateSummariesResult_(), nil
}
func (c *Client) GetJobSummary(role string) (*aurora.JobSummaryResult_, error) {
resp, retryErr := c.thriftCallWithRetries(false, func() (*aurora.Response, error) {
return c.readonlyClient.GetJobSummary(context.TODO(), role)
})
if retryErr != nil {
return nil, errors.Wrap(retryErr, "error getting job summaries from Aurora Scheduler")
}
return resp.GetResult_().GetJobSummaryResult_(), nil
}
func (c *Client) GetJobs(role string) (*aurora.GetJobsResult_, error) {
var result *aurora.GetJobsResult_