From 8dab606316237d2bb91b827645686c5318eb0d3e Mon Sep 17 00:00:00 2001 From: Nhat Tan Le Date: Tue, 12 Jan 2021 15:30:57 -0800 Subject: [PATCH] add GetJobSummary API --- realis.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/realis.go b/realis.go index 6299986..a7c536e 100644 --- a/realis.go +++ b/realis.go @@ -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_