mirror of
https://github.com/simonw/datasette.git
synced 2026-06-05 16:46:57 +02:00
Fixed the rest of the warnings
Refs https://github.com/simonw/datasette/pull/2615#issuecomment-3649771920
This commit is contained in:
parent
35ea721469
commit
8895c4a202
8 changed files with 528 additions and 264 deletions
|
|
@ -23,6 +23,14 @@ async def datasette_with_plugin():
|
|||
yield datasette
|
||||
finally:
|
||||
datasette.pm.unregister(name="undo")
|
||||
# Close databases first (while executor is still running)
|
||||
for db in datasette.databases.values():
|
||||
db.close()
|
||||
if hasattr(datasette, "_internal_database"):
|
||||
datasette._internal_database.close()
|
||||
# Then shut down executor
|
||||
if datasette.executor is not None:
|
||||
datasette.executor.shutdown(wait=True)
|
||||
# -- end datasette_with_plugin_fixture --
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue