当前位置: 首页>>代码示例>>Python>>正文


Python BaseEntity.__init__方法代码示例

本文整理汇总了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
开发者ID:pombredanne,项目名称:milkcheck,代码行数:15,代码来源:Service.py

示例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()
开发者ID:mdlx,项目名称:milkcheck,代码行数:23,代码来源:Action.py


注:本文中的MilkCheck.Engine.BaseEntity.BaseEntity.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。