Class: Libis::Workflow::Run

Inherits:
WorkItem show all
Includes:
Base::Run
Defined in:
lib/libis/workflow/run.rb

Instance Attribute Summary collapse

Attributes included from Base::Run

#action, #tasks

Attributes inherited from WorkItem

#items, #options, #parent, #properties, #status_log, #summary

Instance Method Summary collapse

Methods included from Base::Run

#name, #namepath, #names, #run, #work_dir, #workflow

Methods included from Base::WorkItem

#add_item, #each, #get_item_list, #get_items, #get_parent, #get_root, #get_run, #label, #label=, #labelpath, #labels, #name, #name=, #namepath, #names, #save, #save!, #size, #to_filename, #to_s

Methods included from Base::Logging

#<=, #add_log, #log_message

Methods included from Status

#check_status, #compare_status, #set_status, #status, #status_label, #status_progress, #status_text

Constructor Details

#initializeRun

Returns a new instance of Run.



17
18
19
20
21
22
# File 'lib/libis/workflow/run.rb', line 17

def initialize
  @start_date = Time.now
  @job = nil
  @id = SecureRandom.hex(10)
  super
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



15
16
17
# File 'lib/libis/workflow/run.rb', line 15

def id
  @id
end

#jobObject

Returns the value of attribute job.



15
16
17
# File 'lib/libis/workflow/run.rb', line 15

def job
  @job
end

#start_dateObject

Returns the value of attribute start_date.



15
16
17
# File 'lib/libis/workflow/run.rb', line 15

def start_date
  @start_date
end

Instance Method Details

#loggerObject



28
29
30
# File 'lib/libis/workflow/run.rb', line 28

def logger
  self.properties[:logger] || (job.logger rescue nil)
end