Merge pull request #5450 from ywk253100/180801_job_status

Update job status when failed to submit it
This commit is contained in:
Wenkai Yin 2018-08-03 09:33:39 +08:00 committed by GitHub
commit 5f64bc8548
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,6 +119,9 @@ func (d *DefaultReplicator) Replicate(replication *Replication) error {
uuid, err := d.client.SubmitJob(job)
if err != nil {
if er := dao.UpdateRepJobStatus(id, common_models.JobError); er != nil {
log.Errorf("failed to update the status of job %d: %s", id, er)
}
return err
}