def handshake(self, problems, id, key): self._send_packet({'name': 'handshake', 'problems': problems, 'executors': executors.keys(), 'id': id, 'key': key}) try: resp = self._read_single() except Exception: traceback.print_exc() raise JudgeAuthenticationFailed() else: if resp['name'] != 'handshake-success': raise JudgeAuthenticationFailed()
def supported_executors_packet(self): logger.info('Update executors: %s', executors.keys()) self._send_ping_packet({ 'name': 'executor-update', 'executors': executors.keys(), })