Commit 9b1b9881 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Added method to controller to reveal Queue names to enpt_enmapboxapp.


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent efb5c958
Pipeline #24485 passed with stages
in 46 minutes and 23 seconds
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
"""EnPT process controller module.""" """EnPT process controller module."""
import os import os
import sys
import tempfile import tempfile
import zipfile import zipfile
import shutil import shutil
...@@ -156,6 +157,9 @@ class EnPT_Controller(object): ...@@ -156,6 +157,9 @@ class EnPT_Controller(object):
"""Run all processors at once.""" """Run all processors at once."""
if os.getenv('IS_ENPT_GUI_TEST') != "1": if os.getenv('IS_ENPT_GUI_TEST') != "1":
try: try:
if os.getenv('IS_ENPT_GUI_CALL') == "1":
self._write_to_stdout_stderr()
if self.cfg.log_level == 'DEBUG': if self.cfg.log_level == 'DEBUG':
self._print_received_configuration() self._print_received_configuration()
...@@ -200,6 +204,14 @@ class EnPT_Controller(object): ...@@ -200,6 +204,14 @@ class EnPT_Controller(object):
), ),
outF) outF)
@staticmethod
def _write_to_stdout_stderr():
"""Write to STDOUT and STDERR to reveal Queue.name of these streams to enpt_enmapboxapp."""
sys.stdout.write('Connecting to EnPT STDOUT stream.')
sys.stdout.flush()
sys.stderr.write('Connecting to EnPT STDERR stream.')
sys.stderr.flush()
def _print_received_configuration(self): def _print_received_configuration(self):
print('EnPT Controller received the following configuration:') print('EnPT Controller received the following configuration:')
print(repr(self.cfg)) print(repr(self.cfg))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment