code: def __stop(self):  # pragma: no cover
          
  
          if not self._listener_thread:
              return
  
          logger.info('Stopping listener')
          self._celery_receiver.should_stop = True
          self._listener_thread.join()
          self._listener_thread = self._celery_receiver = None
docs: Stops the background engine.