def test(c_id): try: status = docker.test_container(c_id) if status: print '%s %s' % (ok(), 'Connection successful') else: print '%s %s' % (ko(), 'Connection failed') except Exception, e: print '%s %s' % (ko(), e)
def pulse(c_id): try: status = docker.test_container(c_id) except Exception, e: status = False app.logger.error('Error in pulse for %s: %s' % (c_id, e))