diff --git a/locust/runners.py b/locust/runners.py index f397cd5646..dd19bb1011 100644 --- a/locust/runners.py +++ b/locust/runners.py @@ -4,7 +4,7 @@ import socket import traceback import warnings -from hashlib import md5 +from uuid import uuid4 from time import time import gevent @@ -352,7 +352,7 @@ def slave_count(self): class SlaveLocustRunner(DistributedLocustRunner): def __init__(self, *args, **kwargs): super(SlaveLocustRunner, self).__init__(*args, **kwargs) - self.client_id = socket.gethostname() + "_" + md5(str(time() + random.randint(0,10000)).encode('utf-8')).hexdigest() + self.client_id = socket.gethostname() + "_" + uuid4().hex self.client = rpc.Client(self.master_host, self.master_port) self.greenlet = Group()