docs: def run(self):
          """
          Starts the server run loop and returns after the server shuts down due to a shutdown-request, Harakiri signal,
          or unhandled exception. See the documentation for `Server.main` for full details on the chain of `Server`
          method calls.
          """
  
          self.logger.info(
              'Service "{service}" server starting up, pysoa version {pysoa}, listening on transport {transport}.'.format(
                  service=self.service_name,
                  pysoa=pysoa.version.__version__,
                  transport=self.transport,
              )
          )
  
          self.setup()
          self.metrics.commit()
  
          if self._async_event_loop_thread:
              self._async_event_loop_thread.start()
  
          self._create_heartbeat_file()
  
          signal.signal(signal.SIGINT, self.handle_shutdown_signal)
          signal.signal(signal.SIGTERM, self.handle_shutdown_signal)
          signal.signal(signal.SIGALRM, self.harakiri)
  
          # noinspection PyBroadException
          try:
              while not self.shutting_down:
                  # reset harakiri timeout
                  signal.alarm(self.settings['harakiri']['timeout'])
                  # Get, process, and execute the next JobRequest
                  self.handle_next_request()
                  self.metrics.commit()
          except MessageReceiveError:
              self.logger.exception('Error receiving message from transport; shutting down')
          except Exception:
              self.metrics.counter('server.error.unknown').increment()
              self.logger.exception('Unhandled server error; shutting down')
          finally:
              self.metrics.commit()
              self.logger.info('Server shutting down')
              if self._async_event_loop_thread:
                  self._async_event_loop_thread.join()
              self._close_django_caches(shutdown=True)
              self._delete_heartbeat_file()
              self.logger.info('Server shutdown complete')