diff options
author | Felipe Artur <felipefac@gmail.com> | 2019-02-19 14:00:53 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2019-02-19 14:00:53 -0300 |
commit | 7bd066a1fa51018211e26ca0c5624aecbc364a66 (patch) | |
tree | 46631f92e7fa68eba06b63fd9bc9c2279b85e739 /db | |
parent | 648b87315d12d18c92ea14b14ae827480ab3093a (diff) | |
download | gitlab-ce-7bd066a1fa51018211e26ca0c5624aecbc364a66.tar.gz |
Address review comments
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20190214112022_schedule_sync_issuables_state_id.rb | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/db/post_migrate/20190214112022_schedule_sync_issuables_state_id.rb b/db/post_migrate/20190214112022_schedule_sync_issuables_state_id.rb index 898bad043ac..2167f19e022 100644 --- a/db/post_migrate/20190214112022_schedule_sync_issuables_state_id.rb +++ b/db/post_migrate/20190214112022_schedule_sync_issuables_state_id.rb @@ -18,6 +18,8 @@ class ScheduleSyncIssuablesStateId < ActiveRecord::Migration[5.0] ISSUES_MIGRATION = 'SyncIssuesStateId'.freeze MERGE_REQUESTS_MIGRATION = 'SyncMergeRequestsStateId'.freeze + disable_ddl_transaction! + class Issue < ActiveRecord::Base include EachBatch @@ -31,19 +33,19 @@ class ScheduleSyncIssuablesStateId < ActiveRecord::Migration[5.0] end def up - Sidekiq::Worker.skipping_transaction_check do - queue_background_migration_jobs_by_range_at_intervals(Issue.where(state_id: nil), - ISSUES_MIGRATION, - DELAY_INTERVAL, - batch_size: BATCH_SIZE - ) - - queue_background_migration_jobs_by_range_at_intervals(MergeRequest.where(state_id: nil), - MERGE_REQUESTS_MIGRATION, - DELAY_INTERVAL, - batch_size: BATCH_SIZE - ) - end + queue_background_migration_jobs_by_range_at_intervals( + Issue.where(state_id: nil), + ISSUES_MIGRATION, + DELAY_INTERVAL, + batch_size: BATCH_SIZE + ) + + queue_background_migration_jobs_by_range_at_intervals( + MergeRequest.where(state_id: nil), + MERGE_REQUESTS_MIGRATION, + DELAY_INTERVAL, + batch_size: BATCH_SIZE + ) end def down |