From 29680bd7ad47dca57d69847539efca960104d4e0 Mon Sep 17 00:00:00 2001
From: jingquan huang
Date: Fri, 19 Jul 2019 18:07:43 +0800
Subject: [PATCH 01/54] sync new git
---
lib/tasks/gitlab_new.rake | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 lib/tasks/gitlab_new.rake
diff --git a/lib/tasks/gitlab_new.rake b/lib/tasks/gitlab_new.rake
new file mode 100644
index 00000000..fd6e0c56
--- /dev/null
+++ b/lib/tasks/gitlab_new.rake
@@ -0,0 +1,31 @@
+namespace :gitlab do
+ task :myshixun_newgit => :environment do
+ g = Gitlab.client
+ myshixuns = Myshixun.where("repo_name is null")
+ myshixuns.find_each do |myshixun|
+ begin
+ puts myshixun.id
+ repo_name = g.project(myshixun.gpid).path_with_namespace
+ puts repo_name
+ myshixun.update_column(:repo_name, repo_name)
+ rescue Exception => e
+ Rails.logger.error("e.message")
+ end
+ end
+ end
+
+ task :shixun_newgit => :environment do
+ g = Gitlab.client
+ shixuns = Shixun.where("repo_name is null")
+ shixuns.find_each do |shixun|
+ begin
+ puts shixun.id
+ repo_name = g.project(shixun.gpid).path_with_namespace
+ puts shixun.id
+ shixun.update_column(:repo_name, repo_name)
+ rescue Exception => e
+ Rails.logger.error("e.message")
+ end
+ end
+ end
+end
From f539ed26bcf602d1943ac844bce7133fa4eabe39 Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Fri, 19 Jul 2019 18:33:22 +0800
Subject: [PATCH 02/54] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
...626064125_create_shixun_service_configs.rb | 20 +++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/db/migrate/20190626064125_create_shixun_service_configs.rb b/db/migrate/20190626064125_create_shixun_service_configs.rb
index a15a30f6..bb4a150c 100644
--- a/db/migrate/20190626064125_create_shixun_service_configs.rb
+++ b/db/migrate/20190626064125_create_shixun_service_configs.rb
@@ -1,14 +1,14 @@
class CreateShixunServiceConfigs < ActiveRecord::Migration
def change
- create_table :shixun_service_configs do |t|
- t.references :shixun
- t.integer :cpu_limit, :default => 1
- t.integer :memory_limit, :default => 1024
- t.integer :request_limit, :default => 10
- t.float :lower_cpu_limit, :default => 0.1
- t.integer :resource_limit, :default => 10000
- t.references :mirror_repository
- t.timestamps
- end
+ # create_table :shixun_service_configs do |t|
+ # t.references :shixun
+ # t.integer :cpu_limit, :default => 1
+ # t.integer :memory_limit, :default => 1024
+ # t.integer :request_limit, :default => 10
+ # t.float :lower_cpu_limit, :default => 0.1
+ # t.integer :resource_limit, :default => 10000
+ # t.references :mirror_repository
+ # t.timestamps
+ # end
end
end
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 03/54] =?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
From 4fd18b50ed64ea56972719472d31896291bc8128 Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Fri, 19 Jul 2019 18:36:20 +0800
Subject: [PATCH 04/54] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
...fy_request_limit_for_shixun_service_config.rb | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb b/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb
index 060cad94..3cab9b73 100644
--- a/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb
+++ b/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb
@@ -1,13 +1,13 @@
class ModifyRequestLimitForShixunServiceConfig < ActiveRecord::Migration
def up
- ShixunServiceConfig.find_each do |config|
- # repertoire_id = 5 代表的是大数据的镜像
- if config.mirror_repository.repertoire_id != 5
- config.update_column(:request_limit, 10)
- else
- puts("####---#{config.mirror_repository.name}")
- end
- end
+ # ShixunServiceConfig.find_each do |config|
+ # # repertoire_id = 5 代表的是大数据的镜像
+ # if config.mirror_repository.repertoire_id != 5
+ # config.update_column(:request_limit, 10)
+ # else
+ # puts("####---#{config.mirror_repository.name}")
+ # end
+ # end
end
def down
From 7766f7bfecd902ab43834078908663616af78dfe Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Fri, 19 Jul 2019 18:37:43 +0800
Subject: [PATCH 05/54] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
db/migrate/20190716073605_create_user_agents.rb | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/db/migrate/20190716073605_create_user_agents.rb b/db/migrate/20190716073605_create_user_agents.rb
index 22bc181e..1b2e6844 100644
--- a/db/migrate/20190716073605_create_user_agents.rb
+++ b/db/migrate/20190716073605_create_user_agents.rb
@@ -1,12 +1,12 @@
class CreateUserAgents < ActiveRecord::Migration
def change
- create_table :user_agents do |t|
- t.string :type
- t.string :key
- t.string :ip
-
- t.timestamps
- end
- add_index(:user_agents, :ip, :unique => true)
+ # create_table :user_agents do |t|
+ # t.string :type
+ # t.string :key
+ # t.string :ip
+ #
+ # t.timestamps
+ # end
+ # add_index(:user_agents, :ip, :unique => true)
end
end
From d5513dff4f95a1030242a3c3be3f63fbf943306a Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Fri, 19 Jul 2019 18:38:22 +0800
Subject: [PATCH 06/54] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
db/migrate/20190718005920_modify_type_for_user_agents.rb | 2 +-
db/migrate/20190719062616_add_ip_for_user_actions.rb | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/db/migrate/20190718005920_modify_type_for_user_agents.rb b/db/migrate/20190718005920_modify_type_for_user_agents.rb
index 72d4f99b..4d9587ec 100644
--- a/db/migrate/20190718005920_modify_type_for_user_agents.rb
+++ b/db/migrate/20190718005920_modify_type_for_user_agents.rb
@@ -1,6 +1,6 @@
class ModifyTypeForUserAgents < ActiveRecord::Migration
def up
- rename_column :user_agents, :type, :agent_type
+ # rename_column :user_agents, :type, :agent_type
end
def down
diff --git a/db/migrate/20190719062616_add_ip_for_user_actions.rb b/db/migrate/20190719062616_add_ip_for_user_actions.rb
index d1297176..59b41dee 100644
--- a/db/migrate/20190719062616_add_ip_for_user_actions.rb
+++ b/db/migrate/20190719062616_add_ip_for_user_actions.rb
@@ -1,8 +1,8 @@
class AddIpForUserActions < ActiveRecord::Migration
def up
- add_column :user_actions, :ip, :string
-
- UserAgent.where("agent_type is null").update_all(:agent_type => 1)
+ # add_column :user_actions, :ip, :string
+ #
+ # UserAgent.where("agent_type is null").update_all(:agent_type => 1)
end
def down
From be800816238fb764b8d4851a910f818c3db37ec3 Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Fri, 19 Jul 2019 18:39:17 +0800
Subject: [PATCH 07/54] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
db/migrate/20190719062616_add_ip_for_user_actions.rb | 10 ----------
db/migrate/20190719062617_add_ip_for_user_actions.rb | 10 ++++++++++
2 files changed, 10 insertions(+), 10 deletions(-)
delete mode 100644 db/migrate/20190719062616_add_ip_for_user_actions.rb
create mode 100644 db/migrate/20190719062617_add_ip_for_user_actions.rb
diff --git a/db/migrate/20190719062616_add_ip_for_user_actions.rb b/db/migrate/20190719062616_add_ip_for_user_actions.rb
deleted file mode 100644
index 59b41dee..00000000
--- a/db/migrate/20190719062616_add_ip_for_user_actions.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-class AddIpForUserActions < ActiveRecord::Migration
- def up
- # add_column :user_actions, :ip, :string
- #
- # UserAgent.where("agent_type is null").update_all(:agent_type => 1)
- end
-
- def down
- end
-end
diff --git a/db/migrate/20190719062617_add_ip_for_user_actions.rb b/db/migrate/20190719062617_add_ip_for_user_actions.rb
new file mode 100644
index 00000000..d1297176
--- /dev/null
+++ b/db/migrate/20190719062617_add_ip_for_user_actions.rb
@@ -0,0 +1,10 @@
+class AddIpForUserActions < ActiveRecord::Migration
+ def up
+ add_column :user_actions, :ip, :string
+
+ UserAgent.where("agent_type is null").update_all(:agent_type => 1)
+ end
+
+ def down
+ end
+end
From 5551a1ae3b74af043fb95b571481b4e537c929ef Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Fri, 19 Jul 2019 18:41:09 +0800
Subject: [PATCH 08/54] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
...626064125_create_shixun_service_configs.rb | 20 ++++++-------
.../20190626070641_add_limit_for_shixuns.rb | 28 +++++++++----------
...request_limit_for_shixun_service_config.rb | 16 +++++------
.../20190716073605_create_user_agents.rb | 16 +++++------
...90718005920_modify_type_for_user_agents.rb | 2 +-
...20190719062616_add_ip_for_user_actions.rb} | 0
6 files changed, 41 insertions(+), 41 deletions(-)
rename db/migrate/{20190719062617_add_ip_for_user_actions.rb => 20190719062616_add_ip_for_user_actions.rb} (100%)
diff --git a/db/migrate/20190626064125_create_shixun_service_configs.rb b/db/migrate/20190626064125_create_shixun_service_configs.rb
index bb4a150c..a15a30f6 100644
--- a/db/migrate/20190626064125_create_shixun_service_configs.rb
+++ b/db/migrate/20190626064125_create_shixun_service_configs.rb
@@ -1,14 +1,14 @@
class CreateShixunServiceConfigs < ActiveRecord::Migration
def change
- # create_table :shixun_service_configs do |t|
- # t.references :shixun
- # t.integer :cpu_limit, :default => 1
- # t.integer :memory_limit, :default => 1024
- # t.integer :request_limit, :default => 10
- # t.float :lower_cpu_limit, :default => 0.1
- # t.integer :resource_limit, :default => 10000
- # t.references :mirror_repository
- # t.timestamps
- # end
+ create_table :shixun_service_configs do |t|
+ t.references :shixun
+ t.integer :cpu_limit, :default => 1
+ t.integer :memory_limit, :default => 1024
+ t.integer :request_limit, :default => 10
+ t.float :lower_cpu_limit, :default => 0.1
+ t.integer :resource_limit, :default => 10000
+ t.references :mirror_repository
+ t.timestamps
+ end
end
end
diff --git a/db/migrate/20190626070641_add_limit_for_shixuns.rb b/db/migrate/20190626070641_add_limit_for_shixuns.rb
index e8ba1679..e403c061 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
diff --git a/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb b/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb
index 3cab9b73..060cad94 100644
--- a/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb
+++ b/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb
@@ -1,13 +1,13 @@
class ModifyRequestLimitForShixunServiceConfig < ActiveRecord::Migration
def up
- # ShixunServiceConfig.find_each do |config|
- # # repertoire_id = 5 代表的是大数据的镜像
- # if config.mirror_repository.repertoire_id != 5
- # config.update_column(:request_limit, 10)
- # else
- # puts("####---#{config.mirror_repository.name}")
- # end
- # end
+ ShixunServiceConfig.find_each do |config|
+ # repertoire_id = 5 代表的是大数据的镜像
+ if config.mirror_repository.repertoire_id != 5
+ config.update_column(:request_limit, 10)
+ else
+ puts("####---#{config.mirror_repository.name}")
+ end
+ end
end
def down
diff --git a/db/migrate/20190716073605_create_user_agents.rb b/db/migrate/20190716073605_create_user_agents.rb
index 1b2e6844..22bc181e 100644
--- a/db/migrate/20190716073605_create_user_agents.rb
+++ b/db/migrate/20190716073605_create_user_agents.rb
@@ -1,12 +1,12 @@
class CreateUserAgents < ActiveRecord::Migration
def change
- # create_table :user_agents do |t|
- # t.string :type
- # t.string :key
- # t.string :ip
- #
- # t.timestamps
- # end
- # add_index(:user_agents, :ip, :unique => true)
+ create_table :user_agents do |t|
+ t.string :type
+ t.string :key
+ t.string :ip
+
+ t.timestamps
+ end
+ add_index(:user_agents, :ip, :unique => true)
end
end
diff --git a/db/migrate/20190718005920_modify_type_for_user_agents.rb b/db/migrate/20190718005920_modify_type_for_user_agents.rb
index 4d9587ec..72d4f99b 100644
--- a/db/migrate/20190718005920_modify_type_for_user_agents.rb
+++ b/db/migrate/20190718005920_modify_type_for_user_agents.rb
@@ -1,6 +1,6 @@
class ModifyTypeForUserAgents < ActiveRecord::Migration
def up
- # rename_column :user_agents, :type, :agent_type
+ rename_column :user_agents, :type, :agent_type
end
def down
diff --git a/db/migrate/20190719062617_add_ip_for_user_actions.rb b/db/migrate/20190719062616_add_ip_for_user_actions.rb
similarity index 100%
rename from db/migrate/20190719062617_add_ip_for_user_actions.rb
rename to db/migrate/20190719062616_add_ip_for_user_actions.rb
From 457546c804df3408f8429c7620c11ab60b67b4a8 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Fri, 19 Jul 2019 19:06:56 +0800
Subject: [PATCH 09/54] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E6=9C=8D=E5=8A=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/update.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/update.html b/public/update.html
index e609e7aa..18c1c436 100644
--- a/public/update.html
+++ b/public/update.html
@@ -56,7 +56,7 @@ If you continue to experience problems please contact your Trustie administrator
温馨提示:为了给大家提供更优质的服务
- 平台拟于2019年4月27日17:00--18:30进行全面升级,带来不便,敬请谅解!
+ 平台拟于2019年7月19日21:30--2019年7月20号12:00进行全面升级,带来不便,敬请谅解!