Fix WorkingThread instances

This commit is contained in:
Théophile Bastian 2019-08-29 14:53:06 +02:00
parent 55cab19e33
commit f441944b32

View file

@ -131,7 +131,7 @@ class HostsFile:
raise Exception("Host has no {}".format(field)) raise Exception("Host has no {}".format(field))
self.hosts[entry["host"]] = { self.hosts[entry["host"]] = {
"cores": entry["cores"], "cores": entry["cores"],
"ip": socket.gethostbyname(entry["host"]), "addr": socket.gethostbyname(entry["host"]),
} }
@ -195,7 +195,9 @@ class Orchestrator:
if len(self.threads) >= self.tasks.initial_task_count: if len(self.threads) >= self.tasks.initial_task_count:
return return
self.threads.append( self.threads.append(
WorkingThread(host, self.tasks.queue, self.failures) WorkingThread(
host, host_details["addr"], self.tasks.queue, self.failures
)
) )
def start(self): def start(self):