1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 class Arvados::V1::JobsController < ApplicationController
6 accept_attribute_as_json :components, Hash
7 accept_attribute_as_json :script_parameters, Hash
8 accept_attribute_as_json :runtime_constraints, Hash
9 accept_attribute_as_json :tasks_summary, Hash
10 skip_before_action :find_object_by_uuid, :only => [:queue, :queue_size]
11 skip_before_action :render_404_if_no_object, :only => [:queue, :queue_size]
16 return send_error("Unsupported legacy jobs API",
21 return send_error("Unsupported legacy jobs API",
26 return send_error("Unsupported legacy jobs API",
36 render :json => {:queue_size => 0}
39 def self._create_requires_parameters
43 type: 'boolean', required: false, default: false,
46 type: 'array', required: false,
48 minimum_script_version: {
49 type: 'string', required: false,
51 exclude_script_versions: {
52 type: 'array', required: false,
57 def self._queue_requires_parameters
58 self._index_requires_parameters
63 def load_filters_param
66 attrs = resource_attrs rescue {}
67 @filters = Job.load_job_specific_filters attrs, @filters, @read_users
68 rescue ArgumentError => error
69 send_error(error.message)