diff --git a/realis.go b/realis.go index 64ebda5..5a3b202 100644 --- a/realis.go +++ b/realis.go @@ -553,7 +553,8 @@ func (r *realisClient) GetJobUpdateSummaries(jobUpdateQuery *aurora.JobUpdateQue return resp, nil } -func (r *realisClient) GetJobs(role string) (*aurora.Response, *aurora.GetJobsResult_, error) { + +func (r *realisClient) GetJobs(role string) (*aurora.Response, *aurora.GetJobsResult_, error) { var resp *aurora.Response var result *aurora.GetJobsResult_ var clientErr error @@ -699,7 +700,7 @@ func (r *realisClient) ScheduleCronJob(auroraJob Job) (*aurora.Response, error) }) if retryErr != nil { - return nil, errors.Wrap(clientErr, retryErr.Error()+": Error sending Cron Job Schedule message to Aurora Scheduler") + return nil, errors.Wrap(clientErr, retryErr.Error()+"Error sending Cron Job Schedule message to Aurora Scheduler") } return resp, nil } @@ -722,12 +723,15 @@ func (r *realisClient) DescheduleCronJob(key *aurora.JobKey) (*aurora.Response, }) if retryErr != nil { - return nil, errors.Wrap(clientErr, retryErr.Error()+": Error sending Cron Job De-schedule message to Aurora Scheduler") + return nil, errors.Wrap(clientErr, retryErr.Error()+"Error sending Cron Job De-schedule message to Aurora Scheduler") } return resp, nil } + + + func (r *realisClient) StartCronJob(key *aurora.JobKey) (*aurora.Response, error) { var resp *aurora.Response var clientErr error @@ -898,7 +902,7 @@ func (r *realisClient) ResumeJobUpdate(updateKey *aurora.JobUpdateKey, message s return true, nil }) if retryErr != nil { - return nil, errors.Wrap(clientErr, retryErr.Error()+": Error sending ResumeJobUpdate command to Aurora Scheduler") + return nil, errors.Wrap(retryErr, "Error sending ResumeJobUpdate command to Aurora Scheduler") } return resp, nil @@ -921,7 +925,7 @@ func (r *realisClient) PulseJobUpdate(updateKey *aurora.JobUpdateKey) (*aurora.R return true, nil }) if retryErr != nil { - return nil, errors.Wrap(clientErr, retryErr.Error()+": Error sending PulseJobUpdate command to Aurora Scheduler") + return nil, errors.Wrap(retryErr, "Error sending PulseJobUpdate command to Aurora Scheduler") } return resp, nil diff --git a/updatejob.go b/updatejob.go index c26b7a3..a1be06a 100644 --- a/updatejob.go +++ b/updatejob.go @@ -29,8 +29,7 @@ func NewDefaultUpdateJob(config *aurora.TaskConfig) *UpdateJob { req := aurora.NewJobUpdateRequest() req.TaskConfig = config - s := NewUpdateSettings() - req.Settings = s + req.Settings = NewUpdateSettings() job := NewJob().(*AuroraJob) job.jobConfig.TaskConfig = config