Fix WorkingThread instances

This commit is contained in:
Théophile Bastian 2019-08-29 14:53:06 +02:00
parent 55cab19e33
commit f441944b32
1 changed files with 4 additions and 2 deletions

View File

@ -131,7 +131,7 @@ class HostsFile:
raise Exception("Host has no {}".format(field))
self.hosts[entry["host"]] = {
"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:
return
self.threads.append(
WorkingThread(host, self.tasks.queue, self.failures)
WorkingThread(
host, host_details["addr"], self.tasks.queue, self.failures
)
)
def start(self):