assapin commented on a change in pull request #1:
URL: https://github.com/apache/incubator-liminal/pull/1#discussion_r525989533
##########
File path: scripts/liminal
##########
@@ -84,9 +84,11 @@ def deploy_liminal_core_internal(clean):
def docker_compose_command(command_name, args):
docker_compose_path, project_dir = get_docker_compose_paths()
concated_args = ' '.join(args)
- subprocess.call(
- [f'docker-compose -f "{docker_compose_path}" -p liminal
--project-directory {project_dir} {command_name} {concated_args}'],
- env=os.environ, shell=True)
+ run_command = [f'docker-compose -f "{docker_compose_path}" -p liminal
--project-directory {project_dir} {command_name} {concated_args}']
+ if 'follow' in str(args):
+ subprocess.call(run_command, env=os.environ, shell=True)
+ output = subprocess.run(run_command,env=os.environ, shell=True,
stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
Review comment:
else?
##########
File path: scripts/liminal
##########
@@ -104,6 +106,29 @@ def deploy_liminal_apps(path, clean):
target_yml_name = os.path.join(environment.get_dags_dir(), yml_name)
shutil.copyfile(config_file, target_yml_name)
+def liminal_is_running():
+ stdout, stderr = docker_compose_command('ps', [])
+ return "liminal" in stdout
+
[email protected]("stop", short_help="stops the docker compose")
+def stop():
+ if docker_is_running() and liminal_is_running():
+ # initialize liminal home by default
+ environment.get_liminal_home()
+ docker_compose_command('down', [])
Review comment:
it's enough to write down() and all the containers really shut down
including postgres?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]