def run_clients(num):
for i in range(int(num)):
dirc = 'client%s' % i
with cd(dirc+'/loopix/loopix'):
run("git checkout %s" % BRANCH)
run('twistd -y run_client.py')
pid = run('cat twistd.pid')
print "Run Client on %s with PID %s" % (env.host, pid)
#
# @roles("mixnodes", "providers")
# @parallel
# def reset_config_servers(branch):
# with cd("loopix/loopix"):
# run("git checkout %s" % branch)
# run('git reset --hard')
#
# @roles("clients")
# @parallel
# def reset_config_clients(num, branch):
# for i in range(int(num)):
# dirc = 'client%s' % i
# with cd(dirc+'/loopix/loopix'):
# #sudo('rm -f config.json')
# run("git checkout %s" % branch)
# run('git reset --hard')
#
#
# @roles("mixnodes", "providers")
# @parallel
# def update_git_servers(branch):
# with cd("loopix/loopix"):
# run("git checkout %s" % branch)
# run("git pull")
#
# @roles("clients")
# @parallel
# def update_git_clients(num, branch):
# for i in range(int(num)):
# dirc = 'client%s' % i
# with cd(dirc+'/loopix/loopix'):
# run("git checkout %s" % branch)
# run('git pull')
#
# def update_git(numClients, branch):
# execute(update_git_servers, branch)
# execute(update_git_clients, int(numClients), branch)
#
#
#
评论列表
文章目录