Fix log that stated the number of tools found in toolkit (#144)

The original log was counting the number of files in the toolkit module.
This PR fixes this such that it counts the number of tools in the
toolkit.
This commit is contained in:
Eric Gustin 2024-11-04 09:27:43 -08:00 committed by GitHub
parent b22e3198a7
commit 8dbfed5c52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -103,7 +103,8 @@ def serve_default_actor(
else:
logger.info("Serving the following toolkits:")
for toolkit in toolkits:
logger.info(f" - {toolkit.name} ({toolkit.package_name}): {len(toolkit.tools)} tools")
num_tools = sum(len(tools) for tools in toolkit.tools.values())
logger.info(f" - {toolkit.name} ({toolkit.package_name}): {num_tools} tools")
actor_secret = os.environ.get("ARCADE_ACTOR_SECRET")
if not disable_auth and not actor_secret: