debian-mirror-gitlab/app/services/ci/disable_user_pipeline_schedules_service.rb
2021-04-29 21:17:54 +05:30

11 lines
252 B
Ruby

# frozen_string_literal: true
module Ci
class DisableUserPipelineSchedulesService
def execute(user)
Ci::PipelineSchedule.active.owned_by(user).each_batch do |relation|
relation.update_all(active: false)
end
end
end
end