Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
96d60ac6
Commit
96d60ac6
authored
Jun 07, 2021
by
Andreas Brandl
Committed by
Grzegorz Bizon
Jun 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run pending builds clean up migration in dev and test envs too
parent
95f15dc5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
3 deletions
+1
-3
db/post_migrate/20210525075724_clean_up_pending_builds_table.rb
...t_migrate/20210525075724_clean_up_pending_builds_table.rb
+1
-1
spec/migrations/clean_up_pending_builds_table_spec.rb
spec/migrations/clean_up_pending_builds_table_spec.rb
+0
-2
No files found.
db/post_migrate/20210525075724_clean_up_pending_builds_table.rb
View file @
96d60ac6
...
...
@@ -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
...
...
spec/migrations/clean_up_pending_builds_table_spec.rb
View file @
96d60ac6
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment