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
|
|
|
|
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
|