예제 #1
0
파일: Service.py 프로젝트: fihuer/milkcheck
    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
0
    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
예제 #3
0
파일: Action.py 프로젝트: mdlx/milkcheck
    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()
예제 #4
0
파일: Action.py 프로젝트: fihuer/milkcheck
    def __init__(self, name, target=None, command=None, timeout=None, 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()