Пример #1
0
    def __init__(self):
        self.__transmitter = Transmitter(
            HealthWorker,
            tcp_receiver=(CF.get("HealthMonitor",
                                 'ip'), int(CF.get("HealthMonitor",
                                                   'tcp_port'))),
            name="health")

        self.__health_monitor = None
Пример #2
0
class Middleware(metaclass=Singleton):
    def __init__(self):
        self.__transmitter = Transmitter(MiddleWorker)

        # self.__db_mapper = None

    def start(self):
        self.__transmitter.start()

    def stop(self):
        self.__transmitter.stop()
Пример #3
0
class StorageManager(metaclass=Singleton):
    def __init__(self):
        self.__transmitter = Transmitter(StorageWorker)

        self.__health_monitor = None

    def start(self):
        self.__transmitter.start()
        # self.__health_monitor.start()

    def stop(self):
        self.__transmitter.stop()
Пример #4
0
class HealthManager(metaclass=Singleton):
    def __init__(self):
        self.__transmitter = Transmitter(
            HealthWorker,
            tcp_receiver=(CF.get("HealthMonitor",
                                 'ip'), int(CF.get("HealthMonitor",
                                                   'tcp_port'))),
            name="health")

        self.__health_monitor = None

    def start(self):
        self.__transmitter.start(receivers=(base_tcp, None))
        # self.__health_monitor.start()

    def stop(self):
        self.__transmitter.stop()
Пример #5
0
    def __init__(self):
        self.__transmitter = Transmitter(StorageWorker)

        self.__health_monitor = None
Пример #6
0
    def __init__(self):
        self.__transmitter = Transmitter(ClusterWorker)

        self.__health_monitor = None
Пример #7
0
 def __init__(self):
     self.__transmitter = Transmitter(MiddleWorker)