Revert "Replace AsgiLifespan with AsgiRunOnFirstRequest, refs #1955"

This reverts commit dc18f62089.
This commit is contained in:
Simon Willison 2022-12-15 13:06:45 -08:00
commit 0b68996cc5
5 changed files with 50 additions and 22 deletions

View file

@ -80,7 +80,7 @@ Creating a ``Datasette()`` instance like this as useful shortcut in tests, but t
This method registers any :ref:`plugin_hook_startup` or :ref:`plugin_hook_prepare_jinja2_environment` plugins that might themselves need to make async calls.
If you are using ``await datasette.client.get()`` and similar methods then you don't need to worry about this - Datasette automatically calls ``invoke_startup()`` the first time it handles a request.
If you are using ``await datasette.client.get()`` and similar methods then you don't need to worry about this - those method calls ensure that ``.invoke_startup()`` has been called for you.
.. _testing_plugins_pdb: