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

@ -35,3 +35,4 @@ Bug fixes
| `Issue #6180 <https://redmine.postgresql.org/issues/6180>`_ - Updated missing documentation for the 'Download Image' option in ERD.
| `Issue #6187 <https://redmine.postgresql.org/issues/6187>`_ - Limit the upgrade check to run once per day.
| `Issue #6193 <https://redmine.postgresql.org/issues/6193>`_ - Ensure that ERD throws a warning before closing unsaved changes if open in a new tab.
| `Issue #6208 <https://redmine.postgresql.org/issues/6208>`_ - Fixed an issue where utility(Backup, Maintenance, ...) jobs are failing when the log level is set to DEBUG.

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