def resRsyncResult():
try:
print "??30????????..."
sys.stdout.flush()
time.sleep(30)
rsync_module = gameOption("rsync_module",default="").strip()
rsync_root = gameOption("rsync_root",default="").strip()
rsync_backup_ip = gameOption("rsync_backup_ip",default="").strip()
rootSshObj = ssh.ssh(ip,port=port,user="root")
if rsync_module != "" and rsync_root != "" and rsync_backup_ip != "" :
for i in range(6):
out = execute(fabriccmd,'''cd %s && rsync -art -R --dry-run --delete --out-format="%%n" ./ %s::%s --password-file=/etc/rsyncd.secret'''%(rsync_root,rsync_backup_ip,rsync_module), hosts=[ip])[ip]
if out == None:
break
elif out.strip() != "":
print "??????????????,??60s?????..."
sys.stdout.flush()
time.sleep(60)
else:
print "???????"
break
else:
print "WARNNING: ??????????30s??????version.lua?????????!!!!!!!"
sys.stdout.flush()
time.sleep(30)
except Exception,e10:
print "WARNNING:??????????!err:%s"%str(e10)
评论列表
文章目录