Commit 96d60ac6 authored by Andreas Brandl's avatar Andreas Brandl Committed by Grzegorz Bizon

Run pending builds clean up migration in dev and test envs too

parent 95f15dc5
......@@ -6,7 +6,7 @@ class CleanUpPendingBuildsTable < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
def up
return unless Gitlab.com?
return unless Gitlab.dev_or_test_env? || Gitlab.com?
each_batch('ci_pending_builds', of: BATCH_SIZE) do |min, max|
execute <<~SQL
......
......@@ -10,8 +10,6 @@ RSpec.describe CleanUpPendingBuildsTable do
let(:builds) { table(:ci_builds) }
before do
allow(Gitlab).to receive(:com?).and_return(true)
namespaces.create!(id: 123, name: 'sample', path: 'sample')
projects.create!(id: 123, name: 'sample', path: 'sample', namespace_id: 123)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment