Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2019-06-18 14:45:37 +0300
committerShinya Maeda <shinya@gitlab.com>2019-06-18 17:56:11 +0300
commit36b30cf18e7cf24fbb444eeecca70b719ed3208d (patch)
tree2b3d38079f8df8da57f61cca0489b442c72194ed /app
parent6d68a3a254833ada6228bf245fc43bb8f4d6b85b (diff)
Revert concurrent pipeline schedule creation
This commit reverts the previously introduced concurrent pipeline schedule creation which was a viable solution for mitigating inconsistent pipeline schedule by Sidekiq Memory Killer.
Diffstat (limited to 'app')
-rw-r--r--app/services/ci/pipeline_schedule_service.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/services/ci/pipeline_schedule_service.rb b/app/services/ci/pipeline_schedule_service.rb
index 5b5e9a26520..ef90d91c936 100644
--- a/app/services/ci/pipeline_schedule_service.rb
+++ b/app/services/ci/pipeline_schedule_service.rb
@@ -7,7 +7,18 @@ module Ci
# Otherwise, multiple pipelines could be created in a short interval.
schedule.schedule_next_run!
- RunPipelineScheduleWorker.perform_async(schedule.id, schedule.owner&.id)
+ 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-ce/issues/61955
+ GC.start if Feature.enabled?(:ci_pipeline_schedule_force_gc, default_enabled: true)
+ end
+ end
end
end
end