Class: Marathon::Queues

Inherits:
Object
  • Object
show all
Defined in:
lib/marathon/queue.rb

Overview

This class represents the Queue with all its elements

Instance Method Summary collapse

Constructor Details

#initialize(marathon_instance) ⇒ Queues

Returns a new instance of Queues.



32
33
34
# File 'lib/marathon/queue.rb', line 32

def initialize(marathon_instance)
  @connection = marathon_instance.connection
end

Instance Method Details

#listObject

Show content of the task queue. Returns Array of Queue objects.



38
39
40
41
# File 'lib/marathon/queue.rb', line 38

def list
  json = @connection.get('/v2/queue')['queue']
  json.map { |j| Marathon::Queue.new(j) }
end