diff options
author | Stan Hu <stanhu@gmail.com> | 2017-10-06 22:42:44 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-10-06 22:42:44 -0700 |
commit | 1c0d183fff74f248c89b58319554f14c05b923d6 (patch) | |
tree | 7470cd3848ec28cf105a8b10bbf487deccf38563 | |
parent | 3cfaea65f944e95c5aa89c8cacbd706944722eff (diff) | |
download | gitlab-ce-sh-rubocop-thread-safety.tar.gz |
Disable Rubocopsh-rubocop-thread-safety
4 files changed, 6 insertions, 12 deletions
diff --git a/db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb b/db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb index 08798ff3133..ba0cf549c36 100644 --- a/db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb +++ b/db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb @@ -99,8 +99,7 @@ class ProjectForeignKeysWithCascadingDeletes < ActiveRecord::Migration queues = queues_for_rows(TABLES) threads = queues.map do |queue| - # rubocop:disable ThreadSafety/NewThread - Thread.new do + Thread.new do # rubocop:disable ThreadSafety/NewThread pool.with_connection do |connection| Thread.current[:foreign_key_connection] = connection diff --git a/db/post_migrate/20161221153951_rename_reserved_project_names.rb b/db/post_migrate/20161221153951_rename_reserved_project_names.rb index 462727c86b2..e5154bea062 100644 --- a/db/post_migrate/20161221153951_rename_reserved_project_names.rb +++ b/db/post_migrate/20161221153951_rename_reserved_project_names.rb @@ -44,8 +44,7 @@ class RenameReservedProjectNames < ActiveRecord::Migration start = false threads = Array.new(THREAD_COUNT) do |index| - # rubocop:disable ThreadSafety/NewThread - Thread.new do + Thread.new do # rubocop:disable ThreadSafety/NewThread queue = queues[index] # Wait until we have input to process. diff --git a/db/post_migrate/20170206040400_remove_inactive_default_email_services.rb b/db/post_migrate/20170206040400_remove_inactive_default_email_services.rb index e5f174ed66f..98052d61fca 100644 --- a/db/post_migrate/20170206040400_remove_inactive_default_email_services.rb +++ b/db/post_migrate/20170206040400_remove_inactive_default_email_services.rb @@ -9,8 +9,7 @@ class RemoveInactiveDefaultEmailServices < ActiveRecord::Migration Gitlab::Database.with_connection_pool(2) do |pool| threads = [] - # rubocop:disable ThreadSafety/NewThread - threads << Thread.new do + threads << Thread.new do # rubocop:disable ThreadSafety/NewThread pool.with_connection do |connection| connection.execute <<-SQL.strip_heredoc DELETE FROM services @@ -21,8 +20,7 @@ class RemoveInactiveDefaultEmailServices < ActiveRecord::Migration end end - # rubocop:disable ThreadSafety/NewThread - threads << Thread.new do + threads << Thread.new do # rubocop:disable ThreadSafety/NewThread pool.with_connection do |connection| connection.execute <<-SQL.strip_heredoc DELETE FROM services diff --git a/db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb b/db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb index 7de6c1f541d..a7c6887e4c5 100644 --- a/db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb +++ b/db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb @@ -7,8 +7,7 @@ class MigrateBuildEventsToPipelineEvents < ActiveRecord::Migration Gitlab::Database.with_connection_pool(2) do |pool| threads = [] - # rubocop:disable ThreadSafety/NewThread - threads << Thread.new do + threads << Thread.new do # rubocop:disable ThreadSafety/NewThread pool.with_connection do |connection| Thread.current[:foreign_key_connection] = connection @@ -26,8 +25,7 @@ class MigrateBuildEventsToPipelineEvents < ActiveRecord::Migration end end - # rubocop:disable ThreadSafety/NewThread - threads << Thread.new do + threads << Thread.new do # rubocop:disable ThreadSafety/NewThread pool.with_connection do |connection| Thread.current[:foreign_key_connection] = connection |