Class: Patriot::JobStore::JobTicket
- Inherits:
-
Object
- Object
- Patriot::JobStore::JobTicket
- Defined in:
- lib/patriot/job_store/job_ticket.rb
Overview
a ticket to execute a job.
Instance Attribute Summary collapse
-
#description ⇒ Object
attributes for completion.
-
#exec_host ⇒ Object
attributes for offer.
-
#exec_node ⇒ Object
attributes for offer.
-
#exec_thread ⇒ Object
attributes for offer.
-
#execution_id ⇒ Object
attributes for offer.
-
#exit_code ⇒ Object
attributes for completion.
-
#job_id ⇒ Object
default attributes.
-
#node ⇒ Object
default attributes.
-
#update_id ⇒ Object
default attributes.
Instance Method Summary collapse
-
#initialize(job_id, update_id, node = nil) ⇒ JobTicket
constructor
A new instance of JobTicket.
-
#to_s ⇒ String
Returns string expression of this instance.
Constructor Details
#initialize(job_id, update_id, node = nil) ⇒ JobTicket
Returns a new instance of JobTicket.
15 16 17 18 19 20 |
# File 'lib/patriot/job_store/job_ticket.rb', line 15 def initialize(job_id, update_id, node=nil) raise "job_id should be Symbol but #{job_id} is a #{job_id.class}" unless job_id.is_a?(String) @job_id = job_id @update_id = update_id @node = node end |
Instance Attribute Details
#description ⇒ Object
attributes for completion
10 11 12 |
# File 'lib/patriot/job_store/job_ticket.rb', line 10 def description @description end |
#exec_host ⇒ Object
attributes for offer
8 9 10 |
# File 'lib/patriot/job_store/job_ticket.rb', line 8 def exec_host @exec_host end |
#exec_node ⇒ Object
attributes for offer
8 9 10 |
# File 'lib/patriot/job_store/job_ticket.rb', line 8 def exec_node @exec_node end |
#exec_thread ⇒ Object
attributes for offer
8 9 10 |
# File 'lib/patriot/job_store/job_ticket.rb', line 8 def exec_thread @exec_thread end |
#execution_id ⇒ Object
attributes for offer
8 9 10 |
# File 'lib/patriot/job_store/job_ticket.rb', line 8 def execution_id @execution_id end |
#exit_code ⇒ Object
attributes for completion
10 11 12 |
# File 'lib/patriot/job_store/job_ticket.rb', line 10 def exit_code @exit_code end |
#job_id ⇒ Object
default attributes
6 7 8 |
# File 'lib/patriot/job_store/job_ticket.rb', line 6 def job_id @job_id end |
#node ⇒ Object
default attributes
6 7 8 |
# File 'lib/patriot/job_store/job_ticket.rb', line 6 def node @node end |
#update_id ⇒ Object
default attributes
6 7 8 |
# File 'lib/patriot/job_store/job_ticket.rb', line 6 def update_id @update_id end |
Instance Method Details
#to_s ⇒ String
Returns string expression of this instance
23 24 25 26 27 |
# File 'lib/patriot/job_store/job_ticket.rb', line 23 def to_s node = @node.nil? ? "any" : @node string = "job_id: #{job_id}, update_id: #{update_id}, node: #{node}" return string end |