diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-02-16 01:05:44 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-03-02 17:45:45 +0100 |
commit | 3eafffcef0f8932bab4e06b465f9b63327e87942 (patch) | |
tree | cdb64b4be94007d4b8d0ce380862f21a027267fa /lib/api/runner.rb | |
parent | 3d26a8d0b62f70e02917f7601bc2032fb3aed7e6 (diff) | |
download | gitlab-ce-3eafffcef0f8932bab4e06b465f9b63327e87942.tar.gz |
Refactor JobRequest response structure
Diffstat (limited to 'lib/api/runner.rb')
-rw-r--r-- | lib/api/runner.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/runner.rb b/lib/api/runner.rb index 2e7b96e5169..8372b794739 100644 --- a/lib/api/runner.rb +++ b/lib/api/runner.rb @@ -51,7 +51,7 @@ module API resource :jobs do desc 'Request a job' do - success Entities::RequestJobResponse + success Entities::JobRequest::Response end params do requires :token, type: String, desc: %q(Runner's authentication token) @@ -68,13 +68,13 @@ module API end new_update = current_runner.ensure_runner_queue_value - result = ::Ci::RegisterBuildService.new(current_runner).execute + result = ::Ci::RegisterJobService.new(current_runner).execute if result.valid? if result.build Gitlab::Metrics.add_event(:build_found, project: result.build.project.path_with_namespace) - present result.build, with: Entities::RequestJobResponse + present result.build, with: Entities::JobRequest::Response else Gitlab::Metrics.add_event(:build_not_found) header 'X-GitLab-Last-Update', new_update |