Class: Nomad::JobItem
Constant Summary collapse
- STATUS_RUNNING =
"running".freeze
Constants inherited from Response
Instance Attribute Summary collapse
-
#create_index ⇒ Integer
readonly
The job create_index.
-
#id ⇒ String
readonly
The job id.
-
#job_modify_index ⇒ Integer
readonly
The job job_modify_index.
-
#job_summary ⇒ JobSummary
readonly
The job job_summary.
-
#modify_index ⇒ Integer
readonly
The job modify_index.
-
#name ⇒ String
readonly
The job name.
-
#parameterized ⇒ Boolean
readonly
The job parameterized.
-
#parent_id ⇒ String
readonly
The job parent_id.
-
#periodic ⇒ Boolean
readonly
The job periodic.
-
#priority ⇒ Integer
readonly
The job priority.
-
#status ⇒ String
readonly
The job status.
-
#status_description ⇒ String
readonly
The job status_description.
-
#stop ⇒ Boolean
readonly
The job stop.
-
#type ⇒ String
readonly
The job type.
Instance Method Summary collapse
-
#running? ⇒ Boolean
Determines if this job is running.
Methods inherited from Response
#==, decode, #initialize, #to_h
Constructor Details
This class inherits a constructor from Nomad::Response
Instance Attribute Details
#create_index ⇒ Integer (readonly)
The job create_index.
115 |
# File 'lib/nomad/api/job.rb', line 115 field :CreateIndex, as: :create_index |
#id ⇒ String (readonly)
The job id.
60 |
# File 'lib/nomad/api/job.rb', line 60 field :ID, as: :id, load: :string_as_nil |
#job_modify_index ⇒ Integer (readonly)
The job job_modify_index.
125 |
# File 'lib/nomad/api/job.rb', line 125 field :JobModifyIndex, as: :job_modify_index |
#job_summary ⇒ JobSummary (readonly)
The job job_summary.
110 |
# File 'lib/nomad/api/job.rb', line 110 field :JobSummary, as: :job_summary, load: ->(item) { JobSummary.decode(item) } |
#modify_index ⇒ Integer (readonly)
The job modify_index.
120 |
# File 'lib/nomad/api/job.rb', line 120 field :ModifyIndex, as: :modify_index |
#name ⇒ String (readonly)
The job name.
70 |
# File 'lib/nomad/api/job.rb', line 70 field :Name, as: :name, load: :string_as_nil |
#parameterized ⇒ Boolean (readonly)
The job parameterized.
90 |
# File 'lib/nomad/api/job.rb', line 90 field :Parameterized, as: :parameterized |
#parent_id ⇒ String (readonly)
The job parent_id.
65 |
# File 'lib/nomad/api/job.rb', line 65 field :ParentID, as: :parent_id, load: :string_as_nil |
#periodic ⇒ Boolean (readonly)
The job periodic.
85 |
# File 'lib/nomad/api/job.rb', line 85 field :Periodic, as: :periodic |
#priority ⇒ Integer (readonly)
The job priority.
80 |
# File 'lib/nomad/api/job.rb', line 80 field :Priority, as: :priority |
#status ⇒ String (readonly)
The job status.
100 |
# File 'lib/nomad/api/job.rb', line 100 field :Status, as: :status, load: :string_as_nil |
#status_description ⇒ String (readonly)
The job status_description.
105 |
# File 'lib/nomad/api/job.rb', line 105 field :StatusDescription, as: :status_description, load: :string_as_nil |
#stop ⇒ Boolean (readonly)
The job stop.
95 |
# File 'lib/nomad/api/job.rb', line 95 field :Stop, as: :stop |
#type ⇒ String (readonly)
The job type.
75 |
# File 'lib/nomad/api/job.rb', line 75 field :Type, as: :type, load: :string_as_nil |
Instance Method Details
#running? ⇒ Boolean
Determines if this job is running.
129 130 131 |
# File 'lib/nomad/api/job.rb', line 129 def running? self.status == STATUS_RUNNING end |