|
|
|
@ -53,7 +53,9 @@ class CreateShixunStudentWorks < ActiveRecord::Migration
|
|
|
|
|
uri = "#{shixun_tomcat}/bridge/game/openGameInstance"
|
|
|
|
|
params = {tpiID: "#{myshixun.id}", tpmGitURL:rep_url, tpiRepoName: gshixun.try(:name)}
|
|
|
|
|
logger.info("openGameInstance params is #{params}")
|
|
|
|
|
res = uri_exec uri, params
|
|
|
|
|
uri = URI.parse(URI.encode(uri.strip))
|
|
|
|
|
res = Net::HTTP.post_form(uri, params).body
|
|
|
|
|
res = JSON.parse(res)
|
|
|
|
|
if (res && res['code'].to_i != 0)
|
|
|
|
|
raise("实训云平台繁忙(繁忙等级:83)")
|
|
|
|
|
end
|