mirror of
https://github.com/simonw/datasette.git
synced 2026-09-16 05:24:21 +02:00
Add a shutdown() plugin hook with ordered graceful teardown
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
26a4879afb
commit
940aae1ea5
5 changed files with 448 additions and 4 deletions
|
|
@ -53,6 +53,13 @@ def test_hook_jump_items_sql():
|
|||
assert "jump_items_sql" in dir(pm.hook)
|
||||
|
||||
|
||||
def test_hook_shutdown():
|
||||
# Detailed behavior (ordering against background-task cancellation and
|
||||
# close(), idempotency, exception handling, sync vs async support) is
|
||||
# covered in tests/test_shutdown.py.
|
||||
assert "shutdown" in dir(pm.hook)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_hook_plugins_dir_plugin_prepare_connection(ds_client):
|
||||
response = await ds_client.get(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue