Revision 24b3b9d6 src/datastore_mad/one_datastore.rb

View differences:

src/datastore_mad/one_datastore.rb
237 237
opts = GetoptLong.new(
238 238
    [ '--threads',         '-t', GetoptLong::OPTIONAL_ARGUMENT ],
239 239
    [ '--ds-types',        '-d', GetoptLong::OPTIONAL_ARGUMENT ],
240
    [ '--system-ds-types', '-s', GetoptLong::OPTIONAL_ARGUMENT ]
240
    [ '--system-ds-types', '-s', GetoptLong::OPTIONAL_ARGUMENT ],
241
    [ '--timeout',         '-w', GetoptLong::OPTIONAL_ARGUMENT ]
241 242
)
242 243

  
243 244
ds_type     = nil
244 245
sys_ds_type = nil
245 246
threads     = 15
247
timeout     = nil
246 248

  
247 249
begin
248 250
    opts.each do |opt, arg|
......
253 255
                ds_type = arg.split(',').map {|a| a.strip }
254 256
            when '--system-ds-types'
255 257
                sys_ds_type = arg.split(',').map {|a| a.strip }
258
            when '--timeout'
259
                timeout = arg
256 260
        end
257 261
    end
258 262
rescue Exception => e
259 263
    exit(-1)
260 264
end
261 265

  
262
ds_driver = DatastoreDriver.new(ds_type, sys_ds_type, :concurrency => threads)
266
ds_driver = DatastoreDriver.new(ds_type, sys_ds_type,
267
                                :concurrency    => threads,
268
                                :timeout        => timeout)
263 269
ds_driver.start_driver

Also available in: Unified diff