def run(self, host=LOCALHOST, port=8080, threads=30, queue=20, timeout=10, sessions=False, embedded=False, ssl=None, debug=True):
        # Do nothing if the app is running.
        if self._up:
            return
        self._host = str(host)
        self._port = int(port)
        self._up   = True
        # Production environment disables errors.
        if debug is False: 
            cp.config.update({"environment": "production"})
        # Embedded environment (mod_wsgi) disables errors & signal handlers.
        if embedded is True: 
            cp.config.update({"environment": "embedded"})
        # Global configuration.
        # If more concurrent requests are made than can be queued / handled,
        # the server will time out and a "connection reset by peer" occurs.
        # Note: SQLite cannot handle many concurrent writes (e.g., UPDATE).
        else:
            cp.config.update({
                "server.socket_host"       : self._host,
                "server.socket_port"       : self._port,
                "server.socket_timeout"    : max(1, timeout),
                "server.socket_queue_size" : max(1, queue),
                "server.thread_pool"       : max(1, threads),
                "server.thread_pool_max"   : -1
            })
        # Secure SSL (https://).
        if ssl:
            cp.config.update({
                "server.ssl_module"        : "builtin",
                "server.ssl_private_key"   : ssl[0] if os.path.exists(ssl[0]) else openable(ssl[0]),
                "server.ssl_certificate"   : ssl[1] if os.path.exists(ssl[1]) else openable(ssl[1])
            })
        # Static content is served from the /static subfolder, 
        # e.g., <img src="g/cat.jpg" /> refers to "/static/g/cat.jpg".
        self._app = cp.tree.mount(self, "/", 
            config={"/": {
                "tools.staticdir.on"       : self.static is not None,
                "tools.staticdir.dir"      : self.static,
                "tools.sessions.on"        : sessions
        }})
        # Static content can include favicon.ico
        self.favicon_ico = cp.tools.staticfile.handler(
            os.path.join(self.static, "favicon.ico")
        )
        # Relative root = project path.
        os.chdir(self._path)
        # With mod_wsgi, stdout is restriced.
        if embedded:
            sys.stdout = sys.stderr
        else:
            atexit.register(self.stop)
            cp.engine.start()
            cp.engine.block()
Redo the last action.
dataset/ETHPy150Open clips/pattern/pattern/server/__init__.py/Application.run--crossover with--dataset/ETHPy150Open kwikteam/phy/phy/cluster/manual/_history.py/GlobalHistory.redo