diff options
Diffstat (limited to 'db/post_migrate/20180405101928_reschedule_builds_stages_migration.rb')
-rw-r--r-- | db/post_migrate/20180405101928_reschedule_builds_stages_migration.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/db/post_migrate/20180405101928_reschedule_builds_stages_migration.rb b/db/post_migrate/20180405101928_reschedule_builds_stages_migration.rb index e19387bce1e..8f7b2e8d852 100644 --- a/db/post_migrate/20180405101928_reschedule_builds_stages_migration.rb +++ b/db/post_migrate/20180405101928_reschedule_builds_stages_migration.rb @@ -17,13 +17,13 @@ class RescheduleBuildsStagesMigration < ActiveRecord::Migration end def up - disable_statement_timeout - - Build.where('stage_id IS NULL').tap do |relation| - queue_background_migration_jobs_by_range_at_intervals(relation, - MIGRATION, - 5.minutes, - batch_size: BATCH_SIZE) + disable_statement_timeout(transaction: false) do + Build.where('stage_id IS NULL').tap do |relation| + queue_background_migration_jobs_by_range_at_intervals(relation, + MIGRATION, + 5.minutes, + batch_size: BATCH_SIZE) + end end end |