From f5e602ee0f8d95617adf6fb9b5a1a132a471fb12 Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Tue, 6 Mar 2018 16:14:23 +0100 Subject: Rename maximum_job_timeout to maximum_timeout --- lib/api/entities.rb | 2 +- lib/api/runner.rb | 4 ++-- lib/api/runners.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/api/entities.rb b/lib/api/entities.rb index bb18fa00dc6..324e14f5654 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -951,7 +951,7 @@ module API expose :tag_list expose :run_untagged expose :locked - expose :maximum_job_timeout + expose :maximum_timeout expose :access_level expose :version, :revision, :platform, :architecture expose :contacted_at diff --git a/lib/api/runner.rb b/lib/api/runner.rb index 73d5993701c..95f57e6402d 100644 --- a/lib/api/runner.rb +++ b/lib/api/runner.rb @@ -14,12 +14,12 @@ module API optional :locked, type: Boolean, desc: 'Should Runner be locked for current project' optional :run_untagged, type: Boolean, desc: 'Should Runner handle untagged jobs' optional :tag_list, type: Array[String], desc: %q(List of Runner's tags) - optional :maximum_job_timeout, type: String, desc: 'Maximum timeout set when this Runner will handle the job' + optional :maximum_timeout, type: String, desc: 'Maximum timeout set when this Runner will handle the job' end post '/' do attributes = attributes_for_keys([:description, :locked, :run_untagged, :tag_list]) .merge(get_runner_details_from_request) - .merge(maximum_job_timeout_human_readable: params[:maximum_job_timeout]) + .merge(maximum_timeout_human_readable: params[:maximum_timeout]) runner = if runner_registration_token_valid? diff --git a/lib/api/runners.rb b/lib/api/runners.rb index b3037235353..5f2a9567605 100644 --- a/lib/api/runners.rb +++ b/lib/api/runners.rb @@ -57,7 +57,7 @@ module API optional :locked, type: Boolean, desc: 'Flag indicating the runner is locked' optional :access_level, type: String, values: Ci::Runner.access_levels.keys, desc: 'The access_level of the runner' - optional :maximum_job_timeout, type: Integer, desc: 'Maximum timeout set when this Runner will handle the job' + optional :maximum_timeout, type: Integer, desc: 'Maximum timeout set when this Runner will handle the job' at_least_one_of :description, :active, :tag_list, :run_untagged, :locked, :access_level end put ':id' do -- cgit v1.2.1