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
8ca74d85
Commit
8ca74d85
authored
Apr 28, 2020
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove FF ci_pipeline_schedule_async
This commit removes the FF
parent
d58353db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
45 deletions
+1
-45
app/services/ci/pipeline_schedule_service.rb
app/services/ci/pipeline_schedule_service.rb
+1
-13
spec/services/ci/pipeline_schedule_service_spec.rb
spec/services/ci/pipeline_schedule_service_spec.rb
+0
-32
No files found.
app/services/ci/pipeline_schedule_service.rb
View file @
8ca74d85
...
...
@@ -6,19 +6,7 @@ module Ci
# Ensure `next_run_at` is set properly before creating a pipeline.
# Otherwise, multiple pipelines could be created in a short interval.
schedule
.
schedule_next_run!
if
Feature
.
enabled?
(
:ci_pipeline_schedule_async
)
RunPipelineScheduleWorker
.
perform_async
(
schedule
.
id
,
schedule
.
owner
&
.
id
)
else
begin
RunPipelineScheduleWorker
.
new
.
perform
(
schedule
.
id
,
schedule
.
owner
&
.
id
)
ensure
##
# This is the temporary solution for avoiding the memory bloat.
# See more https://gitlab.com/gitlab-org/gitlab-foss/issues/61955
GC
.
start
if
Feature
.
enabled?
(
:ci_pipeline_schedule_force_gc
,
default_enabled:
true
)
end
end
RunPipelineScheduleWorker
.
perform_async
(
schedule
.
id
,
schedule
.
owner
&
.
id
)
end
end
end
spec/services/ci/pipeline_schedule_service_spec.rb
View file @
8ca74d85
...
...
@@ -25,38 +25,6 @@ describe Ci::PipelineScheduleService do
subject
end
context
'when ci_pipeline_schedule_async feature flag is disabled'
do
before
do
stub_feature_flags
(
ci_pipeline_schedule_async:
false
)
end
it
'runs RunPipelineScheduleWorker synchronously'
do
expect_next_instance_of
(
RunPipelineScheduleWorker
)
do
|
worker
|
expect
(
worker
).
to
receive
(
:perform
).
with
(
schedule
.
id
,
schedule
.
owner
.
id
)
end
subject
end
it
'calls Garbage Collection manually'
do
expect
(
GC
).
to
receive
(
:start
)
subject
end
context
'when ci_pipeline_schedule_force_gc feature flag is disabled'
do
before
do
stub_feature_flags
(
ci_pipeline_schedule_force_gc:
false
)
end
it
'does not call Garbage Collection manually'
do
expect
(
GC
).
not_to
receive
(
:start
)
subject
end
end
end
context
'when owner is nil'
do
let
(
:schedule
)
{
create
(
:ci_pipeline_schedule
,
project:
project
,
owner:
nil
)
}
...
...
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