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, marathon_instance = Marathon.singleton) ⇒ 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
#initialize(hash, marathon_instance = Marathon.singleton) ⇒ Queue
Create a new queue element object. hash
: Hash returned by API, including ‘app’ and ‘delay’ marathon_instance
: MarathonInstance holding a connection to marathon
10 11 12 13 14 |
# 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 |
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
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/marathon/queue.rb', line 16 def to_s "Marathon::Queue { :appId => #{app.id} :delay => #{delay} }" end |