def get_worker_name(queue):
 name = None
 if queue:
  name = u'{hostname}.{pid}.{queue}'.format(hostname=socket.gethostname(), pid=os.getpid(), queue=queue)
 return name

def get_worker_name ( queue ) : name = None if queue : name = u'{hostname}.{pid}.{queue}' . format ( hostname = socket . gethostname ( ) , pid = os . getpid ( ) , queue = queue ) return name
when limiting worker to a specific queue .