Class: DeepTest::LocalWorkers
- Inherits:
-
Object
- Object
- DeepTest::LocalWorkers
show all
- Defined in:
- lib/deep_test/local_workers.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of LocalWorkers.
4
5
6
7
|
# File 'lib/deep_test/local_workers.rb', line 4
def initialize(options)
@options = options
@warlock = Warlock.new
end
|
Instance Method Details
#load_files(files) ⇒ Object
9
10
11
|
# File 'lib/deep_test/local_workers.rb', line 9
def load_files(files)
files.each {|f| load f}
end
|
#number_of_workers ⇒ Object
34
35
36
|
# File 'lib/deep_test/local_workers.rb', line 34
def number_of_workers
@options.number_of_workers
end
|
#server ⇒ Object
13
14
15
|
# File 'lib/deep_test/local_workers.rb', line 13
def server
@options.server
end
|
#start_all(s) ⇒ Object
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/deep_test/local_workers.rb', line 17
def start_all(s)
each_worker do |worker_num|
start_worker(worker_num) do
reseed_random_numbers
reconnect_to_database
worker = DeepTest::Worker.new(worker_num,
server,
@options.new_listener_list)
worker.run
end
end
end
|
#stop_all ⇒ Object
30
31
32
|
# File 'lib/deep_test/local_workers.rb', line 30
def stop_all
@warlock.stop_all
end
|