Job删除失败的时候添加异常处理
This commit is contained in:
parent
d35809b59f
commit
e1d4d1af97
|
|
@ -29,6 +29,9 @@ class MyshixunsController < ApplicationController
|
|||
end
|
||||
uri = URI("#{jenkins_shixuns}/jenkins-exec/game/deleteJob")
|
||||
res = uri_exec uri, params
|
||||
if (res && res['code'] != 0)
|
||||
raise("Job删除失败")
|
||||
end
|
||||
redirect_to shixun_exec_shixun_path(shixun)
|
||||
rescue Exception => e
|
||||
flash[:error] = "实训重置失败,请稍后重试}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue