code: def send_all_records(self):
      buffer = []
      while self._queue and not self._queue.empty():
          # noinspection PyBroadException
          try:
              request = self._queue.get(block=False)
              if request:
                  buffer.append(request)
          except Exception:
              break
      if buffer:
          self._send_records(buffer)
  
imports: import json
  import sys
  from pathlib2 import Path
  from logging import LogRecord, getLogger, basicConfig, getLevelName, INFO, WARNING, Formatter, makeLogRecord, warning
  from logging.handlers import BufferingHandler
  from .development.worker import DevWorker
  from ...backend_api.services import events
  from ...backend_api.session.session import MaxRequestSizeError
  from ...config import config
  from ...utilities.process.mp import BackgroundMonitor, ForkEvent, ForkQueue
  from ...utilities.process.mp import SafeQueue, SafeEvent
label_desc: Use image node_id 8 for calling the BackgroundLogService obj's underlying member method code with example usage: obj.send_all_records() without return types