code: def greenlet_admin(self):
          
  
          if self.config["processes"] > 1:
              self.log.debug(
                  "Admin server disabled because of multiple processes.")
              return
  
          class Devnull(object):
              def write(self, *_):
                  pass
  
          from gevent import pywsgi
  
          def admin_routes(env, start_response):
              path = env["PATH_INFO"]
              status = "200 OK"
              res = ""
              if path in ["/", "/report", "/report_mem"]:
                  report = self.get_worker_report(with_memory=(path == "/report_mem"))
                  res = bytes(json_stdlib.dumps(report, cls=MongoJSONEncoder), 'utf-8')
              elif path == "/wait_for_idle":
                  self.wait_for_idle()
                  res = bytes("idle", "utf-8")
              else:
                  status = "404 Not Found"
              start_response(status, [('Content-Type', 'application/json')])
              return [res]
  
          server = pywsgi.WSGIServer((self.config["admin_ip"], self.config["admin_port"]), admin_routes, log=Devnull())
  
          try:
              self.log.debug("Starting admin server on port %s" % self.config["admin_port"])
              server.serve_forever()
          except Exception as e:  # pylint: disable=broad-except
              self.log.debug("Error in admin server : %s" % e)
docs: This greenlet is used to get status information about the worker
              when --admin_port was given