Class: Marathon::Queue
Overview
This class represents a Marathon Queue element. See mesosphere.github.io/marathon/docs/rest-api.html#queue for full list of API’s methods.
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
Attributes inherited from Base
Class Method Summary collapse
-
.list ⇒ Object
Show content of the task queue.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Queue
constructor
Create a new queue element object.
- #to_s ⇒ Object
Methods inherited from Base
Methods included from Error
error_class, error_message, from_response
Constructor Details
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
5 6 7 |
# File 'lib/marathon/queue.rb', line 5 def app @app end |
Class Method Details
.list ⇒ Object
Show content of the task queue. Returns Array of Queue objects.
22 23 24 25 |
# File 'lib/marathon/queue.rb', line 22 def list json = Marathon.connection.get('/v2/queue')['queue'] json.map { |j| new(j) } end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/marathon/queue.rb', line 14 def to_s "Marathon::Queue { :appId => #{app.id} :delay => #{delay} }" end |