add clear screen and timestamp
fix test
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user