rm test.conf
This commit is contained in:
50
base.py
50
base.py
@@ -34,27 +34,27 @@ async def lifespan(app: FastAPI):
|
||||
# Startup
|
||||
uvicorn_access_logger = logging.getLogger("uvicorn.access")
|
||||
uvicorn_access_logger.disabled = True
|
||||
|
||||
|
||||
# Start Radio playlists
|
||||
if "radio" in _routes and hasattr(_routes["radio"], "on_start"):
|
||||
await _routes["radio"].on_start()
|
||||
|
||||
|
||||
# Start endpoint background tasks
|
||||
if "trip" in _routes and hasattr(_routes["trip"], "startup"):
|
||||
await _routes["trip"].startup()
|
||||
if "lighting" in _routes and hasattr(_routes["lighting"], "startup"):
|
||||
await _routes["lighting"].startup()
|
||||
|
||||
|
||||
logger.info("Application startup complete")
|
||||
|
||||
|
||||
yield
|
||||
|
||||
|
||||
# Shutdown
|
||||
if "lighting" in _routes and hasattr(_routes["lighting"], "shutdown"):
|
||||
await _routes["lighting"].shutdown()
|
||||
if "trip" in _routes and hasattr(_routes["trip"], "shutdown"):
|
||||
await _routes["trip"].shutdown()
|
||||
|
||||
|
||||
logger.info("Application shutdown complete")
|
||||
|
||||
|
||||
@@ -141,24 +141,26 @@ End Blacklisted Routes
|
||||
Actionable Routes
|
||||
"""
|
||||
|
||||
_routes.update({
|
||||
"randmsg": importlib.import_module("endpoints.rand_msg").RandMsg(
|
||||
app, util, constants
|
||||
),
|
||||
"lyrics": importlib.import_module("endpoints.lyric_search").LyricSearch(
|
||||
app, util, constants
|
||||
),
|
||||
"yt": importlib.import_module("endpoints.yt").YT(app, util, constants),
|
||||
"radio": importlib.import_module("endpoints.radio").Radio(
|
||||
app, util, constants, loop
|
||||
),
|
||||
"meme": importlib.import_module("endpoints.meme").Meme(app, util, constants),
|
||||
"trip": importlib.import_module("endpoints.rip").RIP(app, util, constants),
|
||||
"auth": importlib.import_module("endpoints.auth").Auth(app),
|
||||
"lighting": importlib.import_module("endpoints.lighting").Lighting(
|
||||
app, util, constants
|
||||
),
|
||||
})
|
||||
_routes.update(
|
||||
{
|
||||
"randmsg": importlib.import_module("endpoints.rand_msg").RandMsg(
|
||||
app, util, constants
|
||||
),
|
||||
"lyrics": importlib.import_module("endpoints.lyric_search").LyricSearch(
|
||||
app, util, constants
|
||||
),
|
||||
"yt": importlib.import_module("endpoints.yt").YT(app, util, constants),
|
||||
"radio": importlib.import_module("endpoints.radio").Radio(
|
||||
app, util, constants, loop
|
||||
),
|
||||
"meme": importlib.import_module("endpoints.meme").Meme(app, util, constants),
|
||||
"trip": importlib.import_module("endpoints.rip").RIP(app, util, constants),
|
||||
"auth": importlib.import_module("endpoints.auth").Auth(app),
|
||||
"lighting": importlib.import_module("endpoints.lighting").Lighting(
|
||||
app, util, constants
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
# Misc endpoint depends on radio endpoint instance
|
||||
radio_endpoint = _routes.get("radio")
|
||||
|
||||
Reference in New Issue
Block a user