code: def greenlet_logs(self):
          
  
          while True:
              try:
                  self.flush_logs()
              except Exception as e:  # pylint: disable=broad-except
                  self.log.error("When flushing logs: %s" % e)
              finally:
                  time.sleep(self.config["report_interval"])
docs: This greenlet always runs in background to update current
              logs in MongoDB every 10 seconds.
  
              Caution: it might get delayed when doing long blocking operations.
              Should we do this in a thread instead?