Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-23 15:28:29 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-23 15:28:29 +0300
commit1143411ae848fade4050d3d8319ba5ed88a1b1da (patch)
treeb5caa33eecd10857a0c2e61b7c3225ac04b16577 /lib/gitlab/background_migration
parent627b4833c58b7bd9ffc852d4c76175366ab4f23b (diff)
Reduce Sidekiq signature of scheduled tokens migration
Diffstat (limited to 'lib/gitlab/background_migration')
-rw-r--r--lib/gitlab/background_migration/encrypt_runners_tokens.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/gitlab/background_migration/encrypt_runners_tokens.rb b/lib/gitlab/background_migration/encrypt_runners_tokens.rb
index 4647301f1a9..cb7a4c4d52e 100644
--- a/lib/gitlab/background_migration/encrypt_runners_tokens.rb
+++ b/lib/gitlab/background_migration/encrypt_runners_tokens.rb
@@ -15,6 +15,14 @@ module Gitlab
#
# https://gitlab.com/gitlab-org/gitlab-ce/issues/54328
#
- class EncryptRunnersTokens < EncryptColumns; end
+ class EncryptRunnersTokens < EncryptColumns
+ def perform(model, from, to)
+ resource = "::Gitlab::BackgroundMigration::Models::EncryptColumns::#{model.to_s.capitalize}"
+ model = resource.constantize
+ attributes = model.encrypted_attributes.keys
+
+ super(model, attributes, from, to)
+ end
+ end
end
end