示例#1
0
文件: master.py 项目: hif/TwistedBrew
    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
文件: master.py 项目: hif/TwistedBrew
    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
文件: master.py 项目: hif/TwistedBrew
    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)