2018-06-27 03:23:28 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-05-07 18:35:56 -04:00
|
|
|
class PipelineScheduleWorker
|
2017-11-28 11:08:30 -05:00
|
|
|
include ApplicationWorker
|
2017-05-07 18:35:56 -04:00
|
|
|
include CronjobQueue
|
2019-04-27 23:27:08 -04:00
|
|
|
|
2019-10-18 07:11:44 -04:00
|
|
|
feature_category :continuous_integration
|
2019-10-30 11:14:17 -04:00
|
|
|
worker_resource_boundary :cpu
|
2019-10-18 07:11:44 -04:00
|
|
|
|
2017-05-07 18:35:56 -04:00
|
|
|
def perform
|
2019-05-17 08:10:44 -04:00
|
|
|
Ci::PipelineSchedule.runnable_schedules.preloaded.find_in_batches do |schedules|
|
|
|
|
schedules.each do |schedule|
|
|
|
|
Ci::PipelineScheduleService.new(schedule.project, schedule.owner).execute(schedule)
|
2019-04-27 23:27:08 -04:00
|
|
|
end
|
2017-05-07 18:35:56 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|