Sha256: 6d60d073e2cb0a4f53691bbd997edcfba927f0163d330c444022ae8daf8d773c

Contents?: true

Size: 1.06 KB

Versions: 36

Compression:

Stored size: 1.06 KB

Contents

module KnapsackPro
  module Client
    module API
      module V1
        class Queues < Base
          class << self
            def queue(args)
              request_hash = {
                :fixed_queue_split => KnapsackPro::Config::Env.fixed_queue_split,
                :can_initialize_queue => args.fetch(:can_initialize_queue),
                :commit_hash => args.fetch(:commit_hash),
                :branch => args.fetch(:branch),
                :node_total => args.fetch(:node_total),
                :node_index => args.fetch(:node_index),
                :node_build_id => KnapsackPro::Config::Env.ci_node_build_id,
              }

              if request_hash[:can_initialize_queue]
                request_hash.merge!({
                  :test_files => args.fetch(:test_files)
                })
              end

              action_class.new(
                endpoint_path: '/v1/queues/queue',
                http_method: :post,
                request_hash: request_hash
              )
            end
          end
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
knapsack_pro-2.9.0 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-2.8.0 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-2.7.0 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-2.6.0 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-2.5.0 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-2.4.0 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-2.3.0 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-2.2.1 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-2.2.0 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-2.1.1 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-2.1.0 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-2.0.0 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-1.22.3 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-1.22.2 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-1.22.1 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-1.22.0 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-1.21.0 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-1.20.2 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-1.20.1 lib/knapsack_pro/client/api/v1/queues.rb
knapsack_pro-1.20.0 lib/knapsack_pro/client/api/v1/queues.rb