2018-11-08 19:23:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
class PipelineScheduleWorker
|
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
|
|
|
|
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|
|
|
|
|
Ci::PipelineScheduleService.new(schedule.project, schedule.owner).execute(schedule)
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|