def _wait_for_results(self):
        """Wait for results off the queue. If there is a timeout set, and it is
        exceeded, raise an RPCTimeoutException.
        """
        while True:
            get_timeout = self._next_timeout()
            try:
                msgtype, value = self.queue.get(timeout=get_timeout)
            except QueueEmpty:
                raise dbt.exceptions.RPCTimeoutException(self.timeout)

            if msgtype == QueueMessageType.Log:
                self.logs.append(value)
            elif msgtype in QueueMessageType.terminating():
                return msgtype, value
            else:
                raise dbt.exceptions.InternalException(
                    'Got invalid queue message type {}'.format(msgtype)
                )
Wait for results off the queue. If there is a timeout set, and it is
        exceeded, raise an RPCTimeoutException.