Revision 24b3b9d6 src/tm_mad/one_tm.rb
src/tm_mad/one_tm.rb | ||
---|---|---|
148 | 148 |
if __FILE__ == $0 |
149 | 149 |
opts = GetoptLong.new( |
150 | 150 |
[ '--threads', '-t', GetoptLong::OPTIONAL_ARGUMENT ], |
151 |
[ '--tm-types', '-d', GetoptLong::OPTIONAL_ARGUMENT ] |
|
151 |
[ '--tm-types', '-d', GetoptLong::OPTIONAL_ARGUMENT ], |
|
152 |
[ '--timeout', '-w', GetoptLong::OPTIONAL_ARGUMENT ] |
|
152 | 153 |
) |
153 | 154 |
|
154 | 155 |
tm_type = nil |
155 | 156 |
threads = 15 |
157 |
timeout = 15 |
|
156 | 158 |
|
157 | 159 |
begin |
158 | 160 |
opts.each do |opt, arg| |
... | ... | |
161 | 163 |
threads = arg.to_i |
162 | 164 |
when '--tm-types' |
163 | 165 |
tm_type = arg.split(',').map {|a| a.strip } |
166 |
when '--timeout' |
|
167 |
timeout = arg |
|
164 | 168 |
end |
165 | 169 |
end |
166 | 170 |
rescue Exception => e |
167 | 171 |
exit(-1) |
168 | 172 |
end |
169 | 173 |
|
170 |
tm_driver = TransferManagerDriver.new(tm_type, :concurrency => threads) |
|
174 |
tm_driver = TransferManagerDriver.new(tm_type, |
|
175 |
:concurrency => threads, |
|
176 |
:timeout => timeout) |
|
171 | 177 |
tm_driver.start_driver |
172 | 178 |
end |
Also available in: Unified diff