Fixed an issue where utility(Backup, Maintenance, ...) jobs are failing when the log level is set to DEBUG. Fixes #6208

This commit is contained in:
Akshay Joshi
2021-02-04 14:50:26 +05:30
parent 14036b7aeb
commit 9c7691c891
2 changed files with 3 additions and 2 deletions

View File

@@ -308,7 +308,7 @@ class BatchProcess(object):
# if in debug mode, wait for process to complete and
# get the stdout and stderr of popen.
if config.CONSOLE_LOG_LEVEL <= logging.DEBUG:
output, error = self.get_process_output(cmd, env)
p = self.get_process_output(cmd, env)
else:
p = Popen(
cmd, close_fds=True, stdout=None, stderr=None, stdin=None,
@@ -361,7 +361,7 @@ class BatchProcess(object):
current_app.logger.debug(
'Process Watcher Err:{0}'.format(errors))
return output, errors
return p
def preexec_function(self):
import signal