register_commands() plugin hook, closes #1449

This commit is contained in:
Simon Willison 2021-08-27 18:39:42 -07:00
commit 30c18576d6
4 changed files with 109 additions and 1 deletions

View file

@ -595,6 +595,9 @@ def serve(
uvicorn.run(ds.app(), **uvicorn_kwargs)
pm.hook.register_commands(cli=cli)
async def check_databases(ds):
# Run check_connection against every connected database
# to confirm they are all usable