def _log_remaining(self):
        """When the consumer is paused, send remaining data in the queue"""
        last_batch = []
        while not self.queue.empty():
            last_batch.append(self.queue.get())
        if not len(last_batch):
            return

        self._log_records(last_batch)
        for _ in last_batch:
            self.queue.task_done()
When the consumer is paused, send remaining data in the queue
argilla-v1/src/argilla_v1/monitoring/base.py