Skip to content
Snippets Groups Projects
Commit 1b7e1f5bc641 authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

avoid script using too much CPU if used to start pg

parent c67a9287fb68
No related branches found
No related tags found
No related merge requests found
...@@ -609,15 +609,8 @@ ...@@ -609,15 +609,8 @@
logging.info('Press Ctrl+C to quit') logging.info('Press Ctrl+C to quit')
# print docker logs of odoo # print docker logs of odoo
stream = docker_client.logs(odoo.get('Id'), stream=True, follow=True) for line in docker_client.logs(odoo.get('Id'), stream=True, follow=True):
while isRunning(docker_client, odoo.get('Id')): sys.stdout.write(line)
try:
for log in stream:
sys.stdout.write(log)
except ConnectionError:
# If there is no log for some time requests throw some errors
# we ignore them
pass
# Clean up, just in case # Clean up, just in case
signal_handler(signal.SIGINT, None) signal_handler(signal.SIGINT, None)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment