实训无法更新版本库

Adjustreact
daiao 5 years ago
parent 5b4349d6da
commit 889fb72345

@ -265,7 +265,8 @@ class MyshixunsController < ApplicationController
uid_logger_dubug("-- game build: file update #{@sec_key}, record id is #{record.id}, time is **** #{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}")
end
# 隐藏代码文件 和 VNC的都不需要走版本库
unless @hide_code || (@myshixun.shixun&.vnc_evaluate && params[:evaluate].present?)
vnc = @myshixun.shixun&.vnc && @myshixun.shixun&.vnc_evaluate
unless @hide_code || (vnc && params[:evaluate].present?)
# 远程版本库文件内容
last_content = GitService.file_content(repo_path: @repo_path, path: path)["content"]

@ -0,0 +1,10 @@
class ModifyVncEvaluteForShixuns < ActiveRecord::Migration[5.2]
def change
Shixun.find_each do |shixun|
if !shixun.vnc && shixun.vnc_evaluate
puts "####shixun_id: #{shixun.id}"
shixun.update_column(vnc_evaluate: false)
end
end
end
end
Loading…
Cancel
Save