Class: SimpleWorker::LocalWorker
- Inherits:
-
Object
- Object
- SimpleWorker::LocalWorker
show all
- Includes:
- AbstractWorker
- Defined in:
- lib/simpleworker/local_worker.rb
Instance Attribute Summary
#cmd, #script
Class Method Summary
collapse
Instance Method Summary
collapse
#env, #start, #stop, #wait
Constructor Details
6
7
8
9
|
# File 'lib/simpleworker/local_worker.rb', line 6
def initialize
@script = %W[bash #{File.expand_path(File.dirname(__FILE__))}/bash/simple-localworker]
@env = {}
end
|
Class Method Details
.create(config = {}) ⇒ Object
11
12
13
14
15
16
|
# File 'lib/simpleworker/local_worker.rb', line 11
def self.create(config = {})
worker = new
worker.script = config['script'] if config.has_key? 'script'
worker.cmd = config['cmd'] if config.has_key? 'cmd'
worker
end
|