From 291c33df66df37bb897dea2cedb6bd82a57f63e6 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 19 Jul 2019 18:34:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20190626070641_add_limit_for_shixuns.rb | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/db/migrate/20190626070641_add_limit_for_shixuns.rb b/db/migrate/20190626070641_add_limit_for_shixuns.rb index e403c061..e8ba1679 100644 --- a/db/migrate/20190626070641_add_limit_for_shixuns.rb +++ b/db/migrate/20190626070641_add_limit_for_shixuns.rb @@ -1,19 +1,19 @@ class AddLimitForShixuns < ActiveRecord::Migration def up - if !Challenge.first.has_attribute?(:exec_time) - add_column :challenges, :exec_time, :integer, :default => 120 - end - Shixun.find_each do |shixun| - shixun.challenges.update_all(:exec_time => shixun.exec_time) - shixun.mirror_repositories.each do |mirror| - ShixunServiceConfig.create!(:shixun_id => shixun.id, - :cpu_limit => mirror.cpu_limit, - :memory_limit => mirror.memory_limit, - :request_limit => mirror.memory_limit / 3, - :mirror_repository_id => mirror.id) - end - end - + # if !Challenge.first.has_attribute?(:exec_time) + # add_column :challenges, :exec_time, :integer, :default => 120 + # end + # Shixun.find_each do |shixun| + # shixun.challenges.update_all(:exec_time => shixun.exec_time) + # shixun.mirror_repositories.each do |mirror| + # ShixunServiceConfig.create!(:shixun_id => shixun.id, + # :cpu_limit => mirror.cpu_limit, + # :memory_limit => mirror.memory_limit, + # :request_limit => mirror.memory_limit / 3, + # :mirror_repository_id => mirror.id) + # end + # end + # end