本文整理汇总了Python中gosa.common.components.PluginRegistry.shutdown方法的典型用法代码示例。如果您正苦于以下问题:Python PluginRegistry.shutdown方法的具体用法?Python PluginRegistry.shutdown怎么用?Python PluginRegistry.shutdown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gosa.common.components.PluginRegistry
的用法示例。
在下文中一共展示了PluginRegistry.shutdown方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: shutdown
# 需要导入模块: from gosa.common.components import PluginRegistry [as 别名]
# 或者: from gosa.common.components.PluginRegistry import shutdown [as 别名]
def shutdown():
"""
Function to shut down the backend. Do some clean up and close sockets.
"""
# Shutdown plugin registry
PluginRegistry.shutdown()
logging.info("shut down")
logging.shutdown()
示例2: shutdown
# 需要导入模块: from gosa.common.components import PluginRegistry [as 别名]
# 或者: from gosa.common.components.PluginRegistry import shutdown [as 别名]
def shutdown():
env.active = False
# Wait for threads to shut down
for t in env.threads:
if hasattr(t, 'stop'):
t.stop()
if hasattr(t, 'cancel'):
t.cancel()
t.join(2)
PluginRegistry.shutdown()
if has_dbus:
dr.stop()
示例3: shutdown
# 需要导入模块: from gosa.common.components import PluginRegistry [as 别名]
# 或者: from gosa.common.components.PluginRegistry import shutdown [as 别名]
def shutdown(a=None, b=None):
""" Function to shut down the agent. Do some clean up and close sockets."""
amqp = PluginRegistry.getInstance("AMQPHandler")
# Tell others that we're away now
e = EventMaker()
goodbye = e.Event(e.NodeLeave(e.Id(amqp.env.id)))
amqp.sendEvent(goodbye)
# Shutdown plugins
PluginRegistry.shutdown()
logging.info("shut down")
logging.shutdown()
exit(0)
示例4: pytest_unconfigure
# 需要导入模块: from gosa.common.components import PluginRegistry [as 别名]
# 或者: from gosa.common.components.PluginRegistry import shutdown [as 别名]
def pytest_unconfigure(config):
PluginRegistry.getInstance('HTTPService').srv.stop()
PluginRegistry.shutdown()