Пример #1
0
    def send_ping(ip=None, port=None):
        if ip is None:
            ip = settings.MASTER_IP  # MessageServerIP
        if port is None:
            port = settings.MASTER_PORT  # MessageServerMasterPort
        data = MessagePing
        log.debug('Commanding master - {0}'.format(data))

        mq = PushConnection(ip, port)
        mq.send(data)
Пример #2
0
    def send_ping(ip=None, port=None):
        if ip is None:
            ip = settings.MASTER_IP  # MessageServerIP
        if port is None:
            port = settings.MASTER_PORT  # MessageServerMasterPort
        data = MessagePing
        log.debug('Commanding master - {0}'.format(data))

        mq = PushConnection(ip, port)
        mq.send(data)
Пример #3
0
    def start_work(worker_id, session_detail_id, ip=None, port=None):
        if ip is None:
            ip = settings.MASTER_IP  # MessageServerIP
        if port is None:
            port = settings.MASTER_PORT  # MessageServerMasterPort
        data = MessageWork + MessageSplit + worker_id + MessageSplit + session_detail_id

        log.debug('Commanding master - {0}'.format(data))

        mq = PushConnection(ip, port)
        mq.send(data)
Пример #4
0
    def start_work(worker_id, session_detail_id, ip=None, port=None):
        if ip is None:
            ip = settings.MASTER_IP  # MessageServerIP
        if port is None:
            port = settings.MASTER_PORT  # MessageServerMasterPort
        data = MessageWork + MessageSplit + worker_id + MessageSplit + session_detail_id

        log.debug('Commanding master - {0}'.format(data))

        mq = PushConnection(ip, port)
        mq.send(data)
Пример #5
0
    def send_master(command, params=None, ip=None, port=None):
        if ip is None:
            ip = settings.MASTER_IP  # MessageServerIP
        if port is None:
            port = settings.MASTER_PORT  # MessageServerMasterPort
        data = command
        if params is not None:
            data += (MessageSplit + params)
        log.debug('Commanding master - {0}'.format(data))

        mq = PushConnection(ip, port)
        mq.send(data)
Пример #6
0
    def send_master(command, params=None, ip=None, port=None):
        if ip is None:
            ip = settings.MASTER_IP  # MessageServerIP
        if port is None:
            port = settings.MASTER_PORT  # MessageServerMasterPort
        data = command
        if params is not None:
            data += (MessageSplit + params)
        log.debug('Commanding master - {0}'.format(data))

        mq = PushConnection(ip, port)
        mq.send(data)