Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
GuoTengda1993 committed Mar 8, 2020
1 parent 20520c5 commit cb71ba4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions easy_locust/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ def pt_slave(ip, username, password, ptfile, ptcommand):
connect = ConnectSlave(ip, username, password)
check = connect.check_locust()
if check:
dest = '/root/' + ptfile
dest = '/root/locust_client.py'
connect.trans_file(source=ptfile, dest=dest)
connect.remote_command(command=ptcommand)
connect.close()
Expand Down Expand Up @@ -689,8 +689,8 @@ def timelimit_stop():
logger.error('Something happened, collect Exceptions here: {}'.format(e))
else:
try:
locust_cli_slave = 'nohup locust -f /root/{locustfile} --slave --master-host={masteIP} > /dev/null 2>&1 &'.format(
locustfile=ptpy, masteIP=master_ip)
locust_cli_slave = 'nohup locust -f /root/locust_client.py --slave --master-host={masteIP} > /dev/null 2>&1 &'\
.format(masteIP=master_ip)
thread_pool = []
for slave in pt_slave_info:
if _type == 'xls':
Expand Down Expand Up @@ -781,5 +781,5 @@ def sig_term_handler():
if len(runners.locust_runner.errors) or len(runners.locust_runner.exceptions):
code = options.exit_code_on_error
shutdown(code=code)
except KeyboardInterrupt as e:
except KeyboardInterrupt:
shutdown(0)

0 comments on commit cb71ba4

Please sign in to comment.