成功的时候才更新状态
This commit is contained in:
parent
1f3a13b933
commit
ada7962231
|
@ -853,7 +853,9 @@ class ProjectsController < ApplicationController
|
|||
params = {jobName: jobName, pipeLine: pipeLine}
|
||||
res = uri_exec uri, params
|
||||
training_project_notice res
|
||||
@project.update_attribute(:training_status, 1)
|
||||
if res['code'] == 0
|
||||
@project.update_attribute(:training_status, 1)
|
||||
end
|
||||
end
|
||||
|
||||
def training_project_update
|
||||
|
@ -863,7 +865,9 @@ class ProjectsController < ApplicationController
|
|||
params = {jobName: jobName, pipeLine: pipeLine}
|
||||
res = uri_exec uri, params
|
||||
training_project_notice res
|
||||
@project.update_attribute(:training_status, 1)
|
||||
if res['code'] == 0
|
||||
@project.update_attribute(:training_status, 1)
|
||||
end
|
||||
end
|
||||
|
||||
def training_project_notice res
|
||||
|
|
Loading…
Reference in New Issue