Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
Fix not enough values to unpack #44
Browse files Browse the repository at this point in the history
  • Loading branch information
calio committed Mar 15, 2021
1 parent ce27efb commit ad6faf0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions fiber/docker_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,22 +185,19 @@ def terminate_job(self, job):
logger.debug("terminate job finished, %s", container.status)

def get_listen_addr(self):
ip = None
ip, ifce = find_listen_address()

if sys.platform == "darwin":
# use the same hostname for both master and non master process
# because docker.for.mac.localhost resolves to different inside
# and outside docker container. "docker.for.mac.localhost" is
# the name that doesn't change in and outside the container.
return "docker.for.mac.localhost", 0
return "docker.for.mac.localhost", 0, ifce

if not isinstance(fiber.current_process(), fiber.Process):
# not inside docker
ifce = "docker0"
ip = find_ip_by_net_interface(ifce)
else:
# inside a Fiber process
ip, ifce = find_listen_address()

if ip is None:
raise mp.ProcessError(
Expand Down

0 comments on commit ad6faf0

Please sign in to comment.