Fix status check when trigger replication

Signed-off-by: 陈德 <chende@caicloud.io>
This commit is contained in:
陈德 2018-09-19 11:51:53 +08:00
parent 95d48436b8
commit d6f5560145

View File

@ -65,7 +65,7 @@ func (r *ReplicationAPI) Post() {
count, err := dao.GetTotalCountOfRepJobs(&models.RepJobQuery{
PolicyID: replication.PolicyID,
Statuses: []string{models.RepOpTransfer, models.RepOpDelete},
Statuses: []string{models.JobPending, models.JobRunning},
})
if err != nil {
r.HandleInternalServerError(fmt.Sprintf("failed to filter jobs of policy %d: %v",