debian-mirror-gitlab/app/workers/pipeline_schedule_worker.rb

20 lines
576 B
Ruby
Raw Normal View History

2018-11-08 19:23:39 +05:30
# frozen_string_literal: true
2020-04-08 14:13:33 +05:30
class PipelineScheduleWorker # rubocop:disable Scalability/IdempotentWorker
2018-03-17 18:26:18 +05:30
include ApplicationWorker
2017-08-17 22:00:37 +05:30
include CronjobQueue
2019-07-07 11:18:12 +05:30
2019-12-21 20:55:43 +05:30
feature_category :continuous_integration
2019-12-26 22:10:19 +05:30
worker_resource_boundary :cpu
2019-12-21 20:55:43 +05:30
2017-08-17 22:00:37 +05:30
def perform
2019-09-04 21:01:54 +05:30
Ci::PipelineSchedule.runnable_schedules.preloaded.find_in_batches do |schedules|
schedules.each do |schedule|
2020-03-13 15:44:24 +05:30
with_context(project: schedule.project, user: schedule.owner) do
Ci::PipelineScheduleService.new(schedule.project, schedule.owner).execute(schedule)
end
2017-08-17 22:00:37 +05:30
end
end
end
end