mirror of
https://github.com/simonw/datasette.git
synced 2026-09-16 13:34:07 +02:00
Add shutdown() plugin hook with ordered graceful teardown (#2890)
This commit is contained in:
parent
0c31778580
commit
cca08d2886
7 changed files with 454 additions and 5 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