Class: Ripe::DB::Worker
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Ripe::DB::Worker
- 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
.
Instance Method Summary collapse
-
#dir ⇒ Object
Return path to worker directory.
-
#sh ⇒ Object
Return path to worker/job script, which includes all tasks defined in the worker.
-
#stderr ⇒ Object
Return path to the
stderr
output of the job, which only exists after the job has been completed. -
#stdout ⇒ Object
Return path to the
stdout
output of the job, which only exists after the job has been completed.
Instance Method Details
#dir ⇒ Object
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 |
#sh ⇒ Object
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.
28 29 30 |
# File 'lib/ripe/db/worker.rb', line 28 def sh "#{self.dir}/job.sh" end |
#stderr ⇒ Object
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 |
#stdout ⇒ Object
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 |