Class: Bricolage::DatabaseTaskQueue::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/bricolage/taskqueue.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(job_ref, job_execution) ⇒ Task

Returns a new instance of Task.



299
300
301
302
303
# File 'lib/bricolage/taskqueue.rb', line 299

def initialize(job_ref, job_execution)
  @job = job_ref
  @job_id = job_execution.job_id
  @job_execution_id = job_execution.job_execution_id
end

Instance Attribute Details

#jobObject (readonly)

Returns the value of attribute job.



305
306
307
# File 'lib/bricolage/taskqueue.rb', line 305

def job
  @job
end

#job_execution_idObject (readonly)

Returns the value of attribute job_execution_id.



307
308
309
# File 'lib/bricolage/taskqueue.rb', line 307

def job_execution_id
  @job_execution_id
end

#job_idObject (readonly)

Returns the value of attribute job_id.



306
307
308
# File 'lib/bricolage/taskqueue.rb', line 306

def job_id
  @job_id
end

Class Method Details

.for_job_execution(exec) ⇒ Object



294
295
296
297
# File 'lib/bricolage/taskqueue.rb', line 294

def Task.for_job_execution(exec)
  job_ref = JobNet::JobRef.new(exec.subsystem, exec.job_name, JobNet::Location.dummy)
  new(job_ref, exec)
end