class Marathon::Queue
This class represents a Marathon
Queue
element. See mesosphere.github.io/marathon/docs/rest-api.html#queue for full list of API's methods.
Attributes
app[R]
Public Class Methods
list()
click to toggle source
Show content of the task queue. Returns Array of Queue
objects.
# File lib/marathon/queue.rb, line 24 def list Marathon.singleton.queues.list end
new(hash, marathon_instance = Marathon.singleton)
click to toggle source
Create a new queue element object. hash
: Hash returned by API, including 'app' and 'delay' marathon_instance
: MarathonInstance holding a connection to marathon
Calls superclass method
Marathon::Base::new
# File lib/marathon/queue.rb, line 10 def initialize(hash, marathon_instance = Marathon.singleton) super(hash, %w[delay]) @app = Marathon::App.new(info[:app], marathon_instance, true) @marathon_instance = marathon_instance end
Public Instance Methods
to_s()
click to toggle source
# File lib/marathon/queue.rb, line 16 def to_s "Marathon::Queue { :appId => #{app.id} :delay => #{delay} }" end