Obtain more lines during log follow

This commit is contained in:
Joshua Boniface 2020-11-10 16:14:33 -05:00
parent a38e65be47
commit f729a54a2c
1 changed files with 4 additions and 1 deletions

View File

@ -1020,8 +1020,11 @@ def follow_console_log(config, vm, lines=10):
print(loglines, end='')
while True:
# Grab the next line set
# Grab the next line set (200 is a reasonable number of lines per second; any more are skipped)
try:
params = {
'lines': 200
}
response = call_api(config, 'get', '/vm/{vm}/console'.format(vm=vm), params=params)
new_console_log = response.json()['data']
except Exception: