diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-11-23 15:28:29 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-11-23 15:28:29 +0300 |
commit | 1143411ae848fade4050d3d8319ba5ed88a1b1da (patch) | |
tree | b5caa33eecd10857a0c2e61b7c3225ac04b16577 /lib/gitlab/background_migration | |
parent | 627b4833c58b7bd9ffc852d4c76175366ab4f23b (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.rb | 10 |
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 |