add clear screen and timestamp

fix test
This commit is contained in:
yura
2015-07-07 18:39:35 +03:00
parent b0858cc304
commit c6df5964d9

View File

@@ -96,6 +96,7 @@ Positional Arguments:
<task-id> The task id
"""
import json
import os
import sys
import time
@@ -822,7 +823,14 @@ def _deployment_watch(deployment_id, max_count, interval):
if deployment is None:
return 0
if util.is_windows_platform():
os.system('cls')
else:
if 'TERM' in os.environ:
os.system('clear')
emitter.publish('Deployment update time: '
'{} \n'.format(time.strftime("%Y-%m-%d %H:%M:%S",
time.gmtime())))
emitter.publish(deployment)
time.sleep(interval)
count += 1