コード例 #1
0
ファイル: deploy.py プロジェクト: jbalogh/commander
 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()
コード例 #2
0
ファイル: deploy.py プロジェクト: goosemo/commander
 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)
コード例 #3
0
ファイル: deploy.py プロジェクト: AliceSitedge/vk_bot
 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))