From bb6f9013aaf14607953ab513f6c42c9d91c35e85 Mon Sep 17 00:00:00 2001 From: technillogue Date: Thu, 25 Jul 2024 23:31:51 -0400 Subject: [PATCH] fix incorrect strutlog usage throwing an error when setup fails --- python/cog/server/connection.py | 2 +- python/cog/server/runner.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/cog/server/connection.py b/python/cog/server/connection.py index c941224c23..718a537383 100644 --- a/python/cog/server/connection.py +++ b/python/cog/server/connection.py @@ -23,7 +23,7 @@ async def async_init(self) -> None: # mp may have handled something already but let's dup so exit is clean dup_fd = os.dup(fd) sock = socket.socket(fileno=dup_fd) - sock.setblocking(False) + sock.setblocking(True) # TODO: use /proc/sys/net/core/rmem_max, but special-case language models sz = 65536 sock.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, sz) diff --git a/python/cog/server/runner.py b/python/cog/server/runner.py index 6d002716fd..0b2997aae0 100644 --- a/python/cog/server/runner.py +++ b/python/cog/server/runner.py @@ -199,7 +199,7 @@ async def inner() -> SetupResult: logs.append(traceback.format_exc()) status = schema.Status.FAILED except BaseException: - self.log("caught BaseException during setup, did something go wrong?") + self.log.info("caught BaseException during setup, did something go wrong?") logs.append(traceback.format_exc()) status = schema.Status.FAILED