fixed reposyncer 删除job任务

This commit is contained in:
“xxq250” 2022-08-05 13:48:40 +08:00
parent 99ba523084
commit e7aa05b535
1 changed files with 2 additions and 1 deletions

View File

@ -83,7 +83,8 @@ class ObRepositorySyncsController < ApplicationController
service = ObRepositorySync::ApiService.new(@ob_repository_sync.name)
res = service.delete_job params[:job_id]
tip_exception "保存失败: #{res["msg"]}" if res["code"].to_s != "200"
@ob_repository_sync.destroy!
job = ObRepositorySyncJob.find_by(ob_repository_sync_id: @ob_repository_sync.id, job_id: params[:job_id])
job.destroy! if job.present?
render_ok
end