本文整理汇总了Python中mpx.service.subscription_manager.SUBSCRIPTION_MANAGER.configure方法的典型用法代码示例。如果您正苦于以下问题:Python SUBSCRIPTION_MANAGER.configure方法的具体用法?Python SUBSCRIPTION_MANAGER.configure怎么用?Python SUBSCRIPTION_MANAGER.configure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mpx.service.subscription_manager.SUBSCRIPTION_MANAGER
的用法示例。
在下文中一共展示了SUBSCRIPTION_MANAGER.configure方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from mpx.service.subscription_manager import SUBSCRIPTION_MANAGER [as 别名]
# 或者: from mpx.service.subscription_manager.SUBSCRIPTION_MANAGER import configure [as 别名]
def setUp(self):
DefaultTestFixture.setUp(self)
self.__event_updated_values = {}
self.new_node_tree()
root = as_internal_node('/')
self._cov_counter = 0
GetException().configure({'name':'exception', 'parent':'/services'})
SUBSCRIPTION_MANAGER.configure({'debug':0,
'_normal_pool_size':2,
'_slow_pool_size':2,
'_prime_pool_size':2,
'_minimum_poll_interval':0.001,
'_slow_poll_threshold':0.500,
}
)
for i in range(0,10):
f = FastNode()
f.configure({'parent':root, 'name':"FastNode-%03d"%i})
s = SlowNode()
s.configure({'parent':root, 'name':"SlowNode-%03d"%i})
e = ErrorNode()
e.configure({'parent':root, 'name':"ErrorNode-%03d"%i})
b = BatchNode(i & 1)
b.configure({'parent':root, 'name':"BatchNode-%03d"%i})
root.start()
return
示例2: __init__
# 需要导入模块: from mpx.service.subscription_manager import SUBSCRIPTION_MANAGER [as 别名]
# 或者: from mpx.service.subscription_manager.SUBSCRIPTION_MANAGER import configure [as 别名]
def __init__(self):
ServiceNode.__init__(self)
# Instantiate implicit children.
from mpx.service.interactive import InteractiveService
InteractiveService().configure({'name':'Interactive Service',
'parent':self,'debug':0,
'port':9666,'interface':'localhost'})
from mpx.service.time import Time
Time().configure({'name':'time','parent':self})
from mpx.service.session import SessionManager
SessionManager().configure({'name':'session_manager', 'parent':self})
from mpx.service.user_manager import UserManager
UserManager().configure({'name':'User Manager', 'parent':self})
from mpx.service.subscription_manager import SUBSCRIPTION_MANAGER
SUBSCRIPTION_MANAGER.configure({'name':'Subscription Manager',
'parent':self})
# Guarantee that /services/garbage_collector will exist, whether or not
# there is an entry in the XML file.
from mpx.service.garbage_collector import GARBAGE_COLLECTOR
# @todo Make ReloadableSingleton!
GARBAGE_COLLECTOR.configure({'name':'garbage_collector',
'parent':self})