本文整理汇总了Python中VistAMenuUtil.VistAMenuUtil.gotoTaskmanMgrUtilMenu方法的典型用法代码示例。如果您正苦于以下问题:Python VistAMenuUtil.gotoTaskmanMgrUtilMenu方法的具体用法?Python VistAMenuUtil.gotoTaskmanMgrUtilMenu怎么用?Python VistAMenuUtil.gotoTaskmanMgrUtilMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VistAMenuUtil.VistAMenuUtil
的用法示例。
在下文中一共展示了VistAMenuUtil.gotoTaskmanMgrUtilMenu方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: removeTaskmanFromWait
# 需要导入模块: from VistAMenuUtil import VistAMenuUtil [as 别名]
# 或者: from VistAMenuUtil.VistAMenuUtil import gotoTaskmanMgrUtilMenu [as 别名]
def removeTaskmanFromWait(self, vistAClient):
connection = vistAClient.getConnection()
menuUtil = VistAMenuUtil(duz=1)
menuUtil.gotoTaskmanMgrUtilMenu(vistAClient)
connection.send("Remove Taskman from WAIT State\r")
menuUtil.exitTaskmanMgrUtilMenu(vistAClient)
logger.info("Wait 10 seconds for Taskman to start")
time.sleep(10)
示例2: getTaskmanStatus
# 需要导入模块: from VistAMenuUtil import VistAMenuUtil [as 别名]
# 或者: from VistAMenuUtil.VistAMenuUtil import gotoTaskmanMgrUtilMenu [as 别名]
def getTaskmanStatus(self, vistAClient):
connection = vistAClient.getConnection()
menuUtil = VistAMenuUtil(duz=1)
menuUtil.gotoTaskmanMgrUtilMenu(vistAClient)
connection.send("MTM\r") # Monitor Taskman
curStatus = self.__getTaskmanStatus__(connection)
connection.send("^\r")
menuUtil.exitTaskmanMgrUtilMenu(vistAClient)
return curStatus
示例3: placeTaskmanToWait
# 需要导入模块: from VistAMenuUtil import VistAMenuUtil [as 别名]
# 或者: from VistAMenuUtil.VistAMenuUtil import gotoTaskmanMgrUtilMenu [as 别名]
def placeTaskmanToWait(self, vistAClient, shutdownSubMgrs=True):
connection = vistAClient.getConnection()
menuUtil = VistAMenuUtil(duz=1)
menuUtil.gotoTaskmanMgrUtilMenu(vistAClient)
connection.send("Place Taskman in a WAIT State\r")
connection.expect("Should active submanagers shut down after finishing their current tasks\? ")
if shutdownSubMgrs:
connection.send("YES\r")
else:
connection.send("NO\r")
menuUtil.exitTaskmanMgrUtilMenu(vistAClient)
logger.info("Wait 10 seconds for Taskman to wait state")
time.sleep(10)
示例4: waitTaskmanToCurrent
# 需要导入模块: from VistAMenuUtil import VistAMenuUtil [as 别名]
# 或者: from VistAMenuUtil.VistAMenuUtil import gotoTaskmanMgrUtilMenu [as 别名]
def waitTaskmanToCurrent(self, vistAClient, timeOut=120):
DEFAULT_POLL_INTERVAL = 1 # 1 seconds
MaxRetry = timeOut/DEFAULT_POLL_INTERVAL
startRetry = 0
connection = vistAClient.getConnection()
menuUtil = VistAMenuUtil(duz=1)
menuUtil.gotoTaskmanMgrUtilMenu(vistAClient)
connection.send("MTM\r") # Monitor Taskman
while startRetry < MaxRetry:
curStatus = self.__getTaskmanStatus__(connection)
if self.isTaskmanRunningCurrent(curStatus):
break;
else:
startRetry += 1
time.sleep(DEFAULT_POLL_INTERVAL)
connection.send("\r")
if startRetry >= MaxRetry:
logger.error("Time out while waiting Taskman to Current")
connection.send("^\r")
menuUtil.exitTaskmanMgrUtilMenu(vistAClient)
示例5: startTaskman
# 需要导入模块: from VistAMenuUtil import VistAMenuUtil [as 别名]
# 或者: from VistAMenuUtil.VistAMenuUtil import gotoTaskmanMgrUtilMenu [as 别名]
def startTaskman(self, vistAClient, waitToCurrent=True):
self.verifyTaskmanSiteParameter(vistAClient)
connection = vistAClient.getConnection()
menuUtil = VistAMenuUtil(duz=1)
menuUtil.gotoTaskmanMgrUtilMenu(vistAClient)
connection.send("Restart Task Manager\r")
index = connection.expect(["ARE YOU SURE YOU WANT TO RESTART ANOTHER TASKMAN\?",
"ARE YOU SURE YOU WANT TO RESTART TASKMAN\?"])
if index == 0:
connection.send("NO\r")
elif index == 1:
connection.send("YES\r")
connection.expect("Restarting...TaskMan restarted\!")
menuUtil.exitTaskmanMgrUtilMenu(vistAClient)
curStatus = self.getTaskmanStatus(vistAClient)
if self.isTaskmanInWaitState(curStatus):
self.removeTaskmanFromWait(vistAClient)
if waitToCurrent:
if not self.isTaskmanRunningCurrent(curStatus):
self.waitTaskmanToCurrent(vistAClient)
示例6: stopTaskman
# 需要导入模块: from VistAMenuUtil import VistAMenuUtil [as 别名]
# 或者: from VistAMenuUtil.VistAMenuUtil import gotoTaskmanMgrUtilMenu [as 别名]
def stopTaskman(self, vistAClient, shutdownSubMgrs=True,
shutdownActJobs=True):
connection = vistAClient.getConnection()
menuUtil = VistAMenuUtil(duz=1)
menuUtil.gotoTaskmanMgrUtilMenu(vistAClient)
connection.send("Stop Task Manager\r")
connection.expect("Are you sure you want to stop TaskMan\? ")
connection.send("YES\r")
connection.expect("Should active submanagers shut down after finishing their current tasks\? ")
if shutdownSubMgrs:
connection.send("YES\r")
else:
connection.send("NO\r")
connection.expect("Should active jobs be signaled to stop\? ")
if shutdownActJobs:
connection.send("YES\r")
else:
connection.send("NO\r")
menuUtil.exitTaskmanMgrUtilMenu(vistAClient)
logger.info("Wait 30 seconds for Taskman to stop")
time.sleep(30)