INNER CODE UNIT · Python
_human
KatrielMoses/voidaccess · voidaccess_cli/main.py:330
def _human(seconds: int) -> str:
if seconds < 3600:
return f"{seconds // 60}m"
if seconds < 86400:
return f"{seconds // 3600}h"
return f"{seconds // 86400}d"
for source, ttl in sorted(DEFAULT_TTL.items()):
ttl_table.add_row(source, str(ttl), _human(ttl))
console.print(ttl_table)
def _show_engine_status() -> None:
import asyncio
from voidaccess_cli.adapters import sqlite as sqlite_adapter
sqlite_adapter.init_db()
rows = asyncio.run(sqlite_adapter.get_all_engine_stats())