msg = _unicode_decode(out.getvalue(),
encoding=_encodings['content'], errors='replace')
if msg:
- self.scheduler.output(msg, log_path=self.logfile)
+ self.scheduler.output(msg, log_path=self.logfile,
+ background=self.background)
self.returncode = rval
self.wait()
return event_handled
- def _task_output(self, msg, log_path=None, level=0, noiselevel=-1):
+ def _task_output(self, msg, log_path=None, background=None,
+ level=0, noiselevel=-1):
"""
Output msg to stdout if not self._background. If log_path
is not None then append msg to the log (appends with
corresponds to a supported compression type).
"""
- if not self._background:
+ if background is None:
+ # If the task does not have a local background value
+ # (like for parallel-fetch), then use the global value.
+ background = self._background
+
+ if not background:
writemsg_level(msg, level=level, noiselevel=noiselevel)
if log_path is not None: