fix: keep disabled unused packages manageable
This commit is contained in:
+7
-1
@@ -78,7 +78,13 @@ routes = PromptServer.instance.routes
|
||||
@routes.get("/nodes-stats/packages")
|
||||
async def get_package_stats(request):
|
||||
try:
|
||||
stats = tracker.get_package_stats(mapper)
|
||||
# Include entries parked in custom_nodes/.disabled even when they were
|
||||
# never executed. They are otherwise absent from both the DB and the
|
||||
# live node mapper, leaving no way to re-enable them in the UI.
|
||||
disabled = await asyncio.get_event_loop().run_in_executor(
|
||||
None, list_disabled_packs
|
||||
)
|
||||
stats = tracker.get_package_stats(mapper, disabled)
|
||||
return web.json_response(stats)
|
||||
except Exception:
|
||||
logger.error("nodes-stats: error getting package stats", exc_info=True)
|
||||
|
||||
Reference in New Issue
Block a user