mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Put AsgiLifestyle back so server starts up again, refs #1955
This commit is contained in:
parent
63fb750f39
commit
8b73fc6b47
3 changed files with 45 additions and 19 deletions
|
|
@ -69,6 +69,7 @@ from .utils import (
|
|||
row_sql_params_pks,
|
||||
)
|
||||
from .utils.asgi import (
|
||||
AsgiLifespan,
|
||||
Forbidden,
|
||||
NotFound,
|
||||
DatabaseNotFound,
|
||||
|
|
@ -1431,6 +1432,7 @@ class Datasette:
|
|||
)
|
||||
if self.setting("trace_debug"):
|
||||
asgi = AsgiTracer(asgi)
|
||||
asgi = AsgiLifespan(asgi)
|
||||
asgi = AsgiRunOnFirstRequest(asgi, on_startup=[setup_db, self.invoke_startup])
|
||||
for wrapper in pm.hook.asgi_wrapper(datasette=self):
|
||||
asgi = wrapper(asgi)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue