Beispiel #1
0
 def inner_wrapper(*args, **kwargs):
     t = ThreadPool(remote_limit)
     for host in hosts:
         ctx = Context(remote_kwargs=remote_kwargs)
         ctx.set_host(host)
         t.add_func(f, ctx, *args, **kwargs)
     t.run_all()
Beispiel #2
0
 def inner_wrapper(*args, **kwargs):
     logging.info('Running %s' % getattr(f, '__name__', repr(f)))
     t = ThreadPool(remote_limit)
     for host in hosts:
         ctx = Context(remote_kwargs=remote_kwargs)
         ctx.set_host(host)
         t.add_func(f, ctx, *args, **kwargs)
     start = time.time()
     t.run_all()
     end = time.time()
     finished = ('Finished %s (%0.3fs)' %
                 (getattr(f, '__name__', repr(f)), end - start))
     notify(finished)
     logging.info(finished)
Beispiel #3
0
 def inner_wrapper(*args, **kwargs):
     logging.info('Running %s' % getattr(f, '__name__', repr(f)))
     t = ThreadPool(remote_limit)
     for host in hosts:
         ctx = Context(remote_kwargs=remote_kwargs)
         ctx.set_host(host)
         t.add_func(f, ctx, *args, **kwargs)
     start = time.time()
     t.run_all()
     end = time.time()
     logging.info('Finished %s (%0.3fs)' %
                  (getattr(f, '__name__', repr(f)), end - start))