gitlab-org--gitlab-foss/app/services/ci/disable_user_pipeline_schedules_service.rb

12 lines
252 B
Ruby
Raw Normal View History

# 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