Rename failure reason to stale_schedule

This commit is contained in:
Shinya Maeda 2018-10-02 13:32:35 +09:00 committed by Alessio Caiazza
parent 336affe911
commit 8bc065e02d
4 changed files with 4 additions and 4 deletions

View file

@ -50,7 +50,7 @@ class CommitStatus < ActiveRecord::Base
runner_system_failure: 4,
missing_dependency_failure: 5,
runner_unsupported: 6,
schedule_expired: 7
stale_schedule: 7
}
##

View file

@ -9,7 +9,7 @@ class CommitStatusPresenter < Gitlab::View::Presenter::Delegated
runner_system_failure: 'There has been a runner system failure, please try again',
missing_dependency_failure: 'There has been a missing dependency failure',
runner_unsupported: 'Your runner is outdated, please upgrade your runner',
schedule_expired: 'Scheduled job could not be executed by some reason, please try again'
stale_schedule: 'Delayed job could not be executed by some reason, please try again'
}.freeze
private_constant :CALLOUT_FAILURE_MESSAGES

View file

@ -75,7 +75,7 @@ class StuckCiJobsWorker
relation
.where('scheduled_at < ?', BUILD_SCHEDULED_OUTDATED_TIMEOUT.ago)
.find_each(batch_size: BUILD_SCHEDULED_OUTDATED_BATCH_SIZE) do |build|
drop_build(:outdated, build, :scheduled, BUILD_SCHEDULED_OUTDATED_TIMEOUT, :schedule_expired)
drop_build(:outdated, build, :scheduled, BUILD_SCHEDULED_OUTDATED_TIMEOUT, :stale_schedule)
end
end
end

View file

@ -11,7 +11,7 @@ module Gitlab
runner_system_failure: 'runner system failure',
missing_dependency_failure: 'missing dependency failure',
runner_unsupported: 'unsupported runner',
schedule_expired: 'schedule expired'
stale_schedule: 'stale schedule'
}.freeze
private_constant :REASONS