INNER CODE UNIT · Python
is_running
NextWeb4/lan-file-transfer · lan_transfer/server.py:25
def is_running(self) -> bool:
return bool(self.has_live_thread and self._server and self._server.started)
@property
def has_live_thread(self) -> bool:
return bool(self._thread and self._thread.is_alive())
def start(self) -> None:
if self._thread and self._thread.is_alive():
return
app = create_app(self.config, self.storage)
uvicorn_config = uvicorn.Config(
app,
host=self.config.host,
port=self.config.port,
log_level="info",
access_log=True,