Revision 24b3b9d6 src/market_mad/one_market.rb
src/market_mad/one_market.rb | ||
---|---|---|
281 | 281 |
|
282 | 282 |
opts = GetoptLong.new( |
283 | 283 |
[ '--threads', '-t', GetoptLong::OPTIONAL_ARGUMENT ], |
284 |
[ '--market-types', '-m', GetoptLong::OPTIONAL_ARGUMENT ] |
|
284 |
[ '--market-types', '-m', GetoptLong::OPTIONAL_ARGUMENT ], |
|
285 |
[ '--timeout', '-w', GetoptLong::OPTIONAL_ARGUMENT ] |
|
285 | 286 |
) |
286 | 287 |
|
287 | 288 |
mp_type = nil |
288 | 289 |
threads = 15 |
290 |
timeout = nil |
|
289 | 291 |
|
290 | 292 |
begin |
291 | 293 |
opts.each do |opt, arg| |
... | ... | |
294 | 296 |
threads = arg.to_i |
295 | 297 |
when '--market-types' |
296 | 298 |
mp_type = arg.split(',').map {|a| a.strip } |
299 |
when '--timeout' |
|
300 |
timeout = arg |
|
297 | 301 |
end |
298 | 302 |
end |
299 | 303 |
rescue Exception => e |
300 | 304 |
exit(-1) |
301 | 305 |
end |
302 | 306 |
|
303 |
mp_driver = MarketPlaceDriver.new(mp_type, :concurrency => threads) |
|
307 |
mp_driver = MarketPlaceDriver.new(mp_type, |
|
308 |
:concurrency => threads, |
|
309 |
:timeout => timeout) |
|
304 | 310 |
mp_driver.start_driver |
305 | 311 |
|
Also available in: Unified diff