Skip to content

Commit

Permalink
Do not wrap empty data in Log events
Browse files Browse the repository at this point in the history
  • Loading branch information
meatballhat committed Oct 29, 2024
1 parent 10acd3d commit f33037a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/cog/server/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,8 @@ def _signal_handler(
raise CancelationException()

def _stream_write_hook(self, stream_name: str, data: str) -> None:
if len(data) == 0:
return
if stream_name == sys.stdout.name:
self._events.send(Log(data, source="stdout"))
else:
Expand Down

0 comments on commit f33037a

Please sign in to comment.