Commit 3d9bc07301a9a724564fe7a5ad91d754020d4ef6
1 parent
30e100fa
Exists in
dev
Adding foreground option for start command of pyros.py
Showing
4 changed files
with
9 additions
and
4 deletions
Show diff stats
CHANGELOG
VERSION
pyros.py
... | ... | @@ -795,10 +795,11 @@ def initdb(): |
795 | 795 | @click.option('--observatory', '-o', help='the observatory name to be used') |
796 | 796 | @click.option('--unit', '-u', help='the unit name to be used') |
797 | 797 | @click.option("--computer_hostname","-cp", help="The name of simulated computer hostname") |
798 | +@click.option("--foreground","-fg", is_flag=True, help="Print stdout and error in terminal") | |
798 | 799 | # @click.option('--format', '-f', type=click.Choice(['html', 'xml', 'text']), default='html', show_default=True) |
799 | 800 | # @click.option('--port', default=8000) |
800 | 801 | # def start(agent:str, configfile:str, test, verbosity): |
801 | -def start(agent: str, configfile: str, observatory: str, unit: str, computer_hostname: str): | |
802 | +def start(agent: str, configfile: str, observatory: str, unit: str, computer_hostname: str, foreground: bool): | |
802 | 803 | log.debug("Running start command") |
803 | 804 | try: |
804 | 805 | from config.pyros.config_pyros import ConfigPyros |
... | ... | @@ -956,7 +957,7 @@ def start(agent: str, configfile: str, observatory: str, unit: str, computer_hos |
956 | 957 | # Append this process ( [process id, agent_name, result=failure] ) |
957 | 958 | # ("result" will be updated at the end of execution) |
958 | 959 | current_processes.append( |
959 | - [execProcessFromVenvAsync(cmd), agent_name, -1]) | |
960 | + [execProcessFromVenvAsync(cmd,foreground), agent_name, -1]) | |
960 | 961 | # self.change_dir("..") |
961 | 962 | os.chdir(current_dir) |
962 | 963 | ... | ... |
src/core/pyros_django/pyros/settings.py
... | ... | @@ -471,7 +471,7 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' |
471 | 471 | |
472 | 472 | python_version = subprocess.run( "python --version | cut -d ' ' -f 2 | cut -d '.' -f 1,2",shell=True,stdout=subprocess.PIPE,universal_newlines=True) |
473 | 473 | python_version = python_version.stdout |
474 | -day = "2022-06-03" | |
474 | +day = "2022-06-07" | |
475 | 475 | django_version_major,django_version_minor = django.VERSION[:2][0],django.VERSION[:2][1] |
476 | 476 | pyros_version = read_version_number_from_file(f"{BASE_DIR}/../../../VERSION") |
477 | 477 | ... | ... |