# HG changeset patch # User Vincent Hatakeyama <vincent.hatakeyama@xcg-consulting.fr> # Date 1531393096 -7200 # Thu Jul 12 12:58:16 2018 +0200 # Node ID 1b7e1f5bc6411e36a2dd4451272f2ec620616298 # Parent c67a9287fb68a570a594a6b853b3b555c493e2d1 avoid script using too much CPU if used to start pg diff --git a/docker_dev_start.py b/docker_dev_start.py --- a/docker_dev_start.py +++ b/docker_dev_start.py @@ -609,15 +609,8 @@ logging.info('Press Ctrl+C to quit') # print docker logs of odoo - stream = docker_client.logs(odoo.get('Id'), stream=True, follow=True) - while isRunning(docker_client, odoo.get('Id')): - 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 + for line in docker_client.logs(odoo.get('Id'), stream=True, follow=True): + sys.stdout.write(line) # Clean up, just in case signal_handler(signal.SIGINT, None)