Skip to content

Commit 373b520

Browse files
authored
Revert "fix: process stderr (#450)" (#453)
This reverts commit c7520cb.
1 parent c7520cb commit 373b520

File tree

2 files changed

+7
-19
lines changed

2 files changed

+7
-19
lines changed

runner/app/live/streamer/process_guardian.py

+2-9
Original file line numberDiff line numberDiff line change
@@ -251,15 +251,8 @@ async def _monitor_loop(self):
251251
and time_since_last_output < 60
252252
)
253253
if stopped_recently or gone_stale:
254-
logging.error(
255-
f"No output received while inputs are being sent. Restarting process. \
256-
stopped_recently={stopped_recently} \
257-
gone_stale={gone_stale} \
258-
time_since_last_input={time_since_last_input} \
259-
time_since_last_output={time_since_last_output} \
260-
time_since_start={time_since_start} \
261-
time_since_last_params={time_since_last_params} \
262-
time_since_reload={time_since_reload}"
254+
logging.warning(
255+
"No output received while inputs are being sent. Restarting process."
263256
)
264257
await self._restart_process()
265258
except asyncio.CancelledError:

runner/app/pipelines/live_video_to_video.py

+5-10
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,8 @@ def start_process(self, **kwargs):
122122

123123
self.monitor_thread = threading.Thread(target=self.monitor_process)
124124
self.monitor_thread.start()
125-
self.stdout_thread = threading.Thread(target=log_output, args=(self.process.stdout,))
126-
self.stdout_thread.start()
127-
self.stderr_thread = threading.Thread(target=log_output, args=(self.process.stderr,))
128-
self.stderr_thread.start()
125+
self.log_thread = threading.Thread(target=log_output, args=(self.process.stdout,))
126+
self.log_thread.start()
129127

130128
except subprocess.CalledProcessError as e:
131129
raise InferenceError(f"Error starting infer.py: {e}")
@@ -174,12 +172,9 @@ def stop_process(self, is_monitor_thread: bool = False):
174172
if self.monitor_thread and not is_monitor_thread:
175173
self.monitor_thread.join()
176174
self.monitor_thread = None
177-
if self.stdout_thread:
178-
self.stdout_thread.join()
179-
self.stdout_thread = None
180-
if self.stderr_thread:
181-
self.stderr_thread.join()
182-
self.stderr_thread = None
175+
if self.log_thread:
176+
self.log_thread.join()
177+
self.log_thread = None
183178
logging.info("Infer process stopped successfully")
184179

185180
def __str__(self) -> str:

0 commit comments

Comments
 (0)