gorealis/helpers.go

21 lines
479 B
Go
Raw Normal View History

2021-05-07 15:12:03 -07:00
package realis
import (
"context"
"github.com/paypal/gorealis/gen-go/apache/aurora"
)
func (r *realisClient) jobExists(key aurora.JobKey) bool {
resp, err := r.client.GetConfigSummary(context.TODO(), &key)
if err != nil {
return false
}
return resp == nil ||
2021-05-07 15:12:03 -07:00
resp.GetResult_() == nil ||
resp.GetResult_().GetConfigSummaryResult_() == nil ||
resp.GetResult_().GetConfigSummaryResult_().GetSummary() == nil ||
resp.GetResponseCode() != aurora.ResponseCode_OK
2021-05-07 15:12:03 -07:00
}