X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=bin%2Frefresh-peer.py;h=5249e892e5073ac5e5a3ed13a310b891ea648f5a;hb=refs%2Fheads%2Fmaster;hp=54c8844c8037ee396d9892e78377ffff2cc4070a;hpb=6469aed9563248b2d3c78a1b48ad35f0b4d343a3;p=myplc.git diff --git a/bin/refresh-peer.py b/bin/refresh-peer.py index 54c8844..5249e89 100644 --- a/bin/refresh-peer.py +++ b/bin/refresh-peer.py @@ -1,26 +1,30 @@ #!/usr/bin/env plcsh -# $Id$ import sys,time,os,os.path logdir="/var/log/peers" +# +# WARNING: the bulk of this output now goes into +# /var/log/plcapi.log +# + def Run (peername): timestring=time.strftime("%Y-%m-%d-%H-%M-%S") - print 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',peername - print 'RefreshPeer on %s - starting on %s'%(peername,timestring) - print 'xxxxxxxxxx' + print('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',peername) + print('RefreshPeer on %s - starting on %s'%(peername,timestring)) + print('xxxxxxxxxx') sys.stdout.flush() start=time.time() result=RefreshPeer(peername) finish=time.time() - print 'Total duration',finish-start - print 'xxxxxxxxxx timers:' - keys=result.keys() + print('Total duration',finish-start) + print('xxxxxxxxxx timers:') + keys=list(result.keys()) keys.sort() for key in keys: - print key,result[key] + print(key,result[key]) sys.stdout.flush() sys.stderr.flush()