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)
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)
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)