本文整理汇总了Python中ovd.Platform.System.System.prepareForSessionActions方法的典型用法代码示例。如果您正苦于以下问题:Python System.prepareForSessionActions方法的具体用法?Python System.prepareForSessionActions怎么用?Python System.prepareForSessionActions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ovd.Platform.System.System
的用法示例。
在下文中一共展示了System.prepareForSessionActions方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from ovd.Platform.System import System [as 别名]
# 或者: from ovd.Platform.System.System import prepareForSessionActions [as 别名]
def main(self):
self.synchronizer.restore()
Logger._instance.setQueue(self.logging_queue, False)
System.prepareForSessionActions()
# Prevent the process to be stop by a keyboard interruption
signal.signal(signal.SIGINT, signal.SIG_IGN)
signal.signal(signal.SIGTERM, signal.SIG_IGN)
Logger.debug("Starting SessionManager process")
while True:
self.current_session_id.value = ""
try:
(request, obj) = self.queue2.get_nowait()
except Queue.Empty:
try:
(request, obj) = self.queue.get(True, 4)
except Queue.Empty, e:
continue
except IOError, e:
if e.errno == 4:
break
else:
raise e
示例2: finalize
# 需要导入模块: from ovd.Platform.System import System [as 别名]
# 或者: from ovd.Platform.System.System import prepareForSessionActions [as 别名]
def finalize(self):
Logger._instance.setThreadedMode(False)
self.update_locked_sessions()
for session in self.sessions.values():
self.manager.session_switch_status(session, Session.SESSION_STATUS_WAIT_DESTROY)
System.prepareForSessionActions()
cleaner = SessionManagement(self.manager, None, None, None, None)
for session in self.sessions.values():
session.end_status = Session.SESSION_END_STATUS_SHUTDOWN
cleaner.destroy_session(session)
self.manager.purgeGroup()
Profile.cleanup()