diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2018-05-27 23:02:47 +0300 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2018-06-05 21:37:01 +0300 |
commit | fc916b068199f2624c5b9cfeb0389760448910ff (patch) | |
tree | 08a3c4d3cedbdf02cec6e247def0598243ea2c54 /db/post_migrate | |
parent | 538110740acc1768315af097ef74213a6d8953d2 (diff) |
Migrate jobs in object_storage_upload queue
Diffstat (limited to 'db/post_migrate')
-rw-r--r-- | db/post_migrate/20180603190921_migrate_object_storage_upload_sidekiq_queue.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/db/post_migrate/20180603190921_migrate_object_storage_upload_sidekiq_queue.rb b/db/post_migrate/20180603190921_migrate_object_storage_upload_sidekiq_queue.rb new file mode 100644 index 00000000000..57bee6269b9 --- /dev/null +++ b/db/post_migrate/20180603190921_migrate_object_storage_upload_sidekiq_queue.rb @@ -0,0 +1,16 @@ +class MigrateObjectStorageUploadSidekiqQueue < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + sidekiq_queue_migrate 'object_storage_upload', to: 'object_storage:object_storage_background_move' + end + + def down + # do not migrate any jobs back because we would migrate also + # jobs which were not part of the 'object_storage_upload' + end +end |