Class: Ripe::DB::Worker

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/ripe/db/worker.rb

Overview

This class represents a Worker object in ripe’s internal database. Its fields are defined by Ripe::DB::WorkerMigration.

See Also:

Instance Method Summary collapse

Instance Method Details

#dirObject

Return path to worker directory



17
18
19
# File 'lib/ripe/db/worker.rb', line 17

def dir
  "#{Repo::REPOSITORY_PATH}/workers/#{self.id}"
end

#shObject

Return path to worker/job script, which includes all tasks defined in the worker. This is the script that is actually executed when the worker is run.

See Also:



28
29
30
# File 'lib/ripe/db/worker.rb', line 28

def sh
  "#{self.dir}/job.sh"
end

#stderrObject

Return path to the stderr output of the job, which only exists after the job has been completed.



44
45
46
# File 'lib/ripe/db/worker.rb', line 44

def stderr
  "#{self.dir}/job.stderr"
end

#stdoutObject

Return path to the stdout output of the job, which only exists after the job has been completed.



36
37
38
# File 'lib/ripe/db/worker.rb', line 36

def stdout
  "#{self.dir}/job.stdout"
end