Class: Ci::DisableUserPipelineSchedulesService

Inherits:
Object
  • Object
show all
Defined in:
app/services/ci/disable_user_pipeline_schedules_service.rb

Instance Method Summary collapse

Instance Method Details

#execute(user) ⇒ Object


5
6
7
8
9
# File 'app/services/ci/disable_user_pipeline_schedules_service.rb', line 5

def execute(user)
  Ci::PipelineSchedule.active.owned_by(user).each_batch do |relation|
    relation.update_all(active: false)
  end
end