Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async cache client fix: don't capture stderr since it contains logs #403

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async def start_server(self, cmdline, env):
)

self._proc = await asyncio.create_subprocess_exec(
*cmdline, env=env, stdin=PIPE, stdout=PIPE, stderr=STDOUT, limit=1024000
*cmdline, env=env, stdin=PIPE, stdout=PIPE, stderr=None, limit=1024000
) # 1024KB

asyncio.gather(self._heartbeat(), self.read_stdout())
Expand All @@ -47,6 +47,8 @@ async def read_message(self, line: str):
# We check for isEnabledFor because some things may be very long to print
# (in particularly pending_requests)
message = json.loads(line)
if not isinstance(message, dict):
raise Exception("Unexpected message type: {} {}".format(type(message), repr(message)))
if self.logger.isEnabledFor(logging.INFO):
self.logger.info(message)
if message["op"] == OP_WORKER_CREATE:
Expand Down
Loading