code: def _main_loop(self):
          '''
          The internal while true main loop for the redis monitor
          '''
          self.logger.debug("Running main loop")
          old_time = 0
          while True:
              for plugin_key in self.plugins_dict:
                  obj = self.plugins_dict[plugin_key]
                  self._process_plugin(obj)
  
              if self.settings['STATS_DUMP'] != 0:
                  new_time = int(old_div(time.time(), self.settings['STATS_DUMP']))
                  # only log every X seconds
                  if new_time != old_time:
                      self._dump_stats()
  
                      if self.settings['STATS_DUMP_CRAWL']:
                          self._dump_crawl_stats()
  
                      if self.settings['STATS_DUMP_QUEUE']:
                          self._dump_queue_stats()
  
                      old_time = new_time
              self._report_self()
              time.sleep(self.settings['SLEEP_TIME']f _main_loop(self):
          '''
          The internal while true main loop for the redis monitor
          '''
          self.logger.debug("Running main loop")
          old_time = 0
          while True:
              for plugin_key in self.plugins_dict:
                  obj = self.plugins_dict[plugin_key]
                  self._process_plugin(obj)
  
              if self.settings['STATS_DUMP'] != 0:
                  new_time = int(old_div(time.time(), self.settings['STATS_DUMP']))
                  # only log every X seconds
                  if new_time != old_time:
                      self._dump_stats()
  
                      if self.settings['STATS_DUMP_CRAWL']:
                          self._dump_crawl_stats()
  
                      if self.settings['STATS_DUMP_QUEUE']:
                          self._dump_queue_stats()
  
                      old_time = new_time
              self._report_self()
              time.sleep(self.settings['SLEEP_TIME'])
docs: The internal while true main loop for the redis monitor