本文整理汇总了Python中MilkCheck.Engine.BaseEntity.BaseEntity.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python BaseEntity.__init__方法的具体用法?Python BaseEntity.__init__怎么用?Python BaseEntity.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MilkCheck.Engine.BaseEntity.BaseEntity
的用法示例。
在下文中一共展示了BaseEntity.__init__方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from MilkCheck.Engine.BaseEntity import BaseEntity [as 别名]
# 或者: from MilkCheck.Engine.BaseEntity.BaseEntity import __init__ [as 别名]
def __init__(self, name, target=None):
BaseEntity.__init__(self, name, target)
# Define a flag allowing us to specify that this service is the
# original caller so we do not have to start his children.
self.origin = False
# Used for ghost services or services that you do not want to execute.
self.simulate = False
# Actions of the service
self._actions = {}
self._last_action = None
示例2: __init__
# 需要导入模块: from MilkCheck.Engine.BaseEntity import BaseEntity [as 别名]
# 或者: from MilkCheck.Engine.BaseEntity.BaseEntity import __init__ [as 别名]
def __init__(self, name, target=None, command=None, timeout=-1, delay=0):
BaseEntity.__init__(self, name=name, target=target, delay=delay)
# Action's timeout in seconds/milliseconds
self.timeout = timeout
# Number of action tries
self.tries = 0
# Command lines that we would like to run
self.command = command
# Results and retcodes
self.worker = None
# Allow us to determine time used by an action within the master task
self.start_time = None
self.stop_time = None
# Store pending targets
self.pending_target = NodeSet()