Class: Ci::StuckBuilds::DropScheduledService

Inherits:
Object
  • Object
show all
Includes:
DropHelpers
Defined in:
app/services/ci/stuck_builds/drop_scheduled_service.rb

Constant Summary collapse

BUILD_SCHEDULED_OUTDATED_TIMEOUT =
1.hour

Instance Method Summary collapse

Methods included from DropHelpers

#drop, #drop_build, #drop_stuck, #fetch, #log_dropping_message, #track_exception_for_build

Instance Method Details

#executeObject



10
11
12
13
14
# File 'app/services/ci/stuck_builds/drop_scheduled_service.rb', line 10

def execute
  Gitlab::AppLogger.info "#{self.class}: Cleaning scheduled, timed-out builds"

  drop(scheduled_timed_out_builds, failure_reason: :stale_schedule)
end