diff --git a/datasette/app.py b/datasette/app.py index cf79df1f..e5d55b42 100644 --- a/datasette/app.py +++ b/datasette/app.py @@ -2890,8 +2890,7 @@ class Datasette: ``_suppress_background_tasks`` is set (the ``--get`` CLI path: its one-shot TestClient request flows through the full ASGI stack, including the first-request fallback, but must never launch - long-lived background work per decision #3 in - ``plans/first-request/04-core-plan.md``). + long-lived background work). """ if self._suppress_background_tasks: return diff --git a/datasette/background_tasks.py b/datasette/background_tasks.py index f06bd9b3..71bca2ee 100644 --- a/datasette/background_tasks.py +++ b/datasette/background_tasks.py @@ -22,9 +22,6 @@ consumer, a scheduled job runner) register it with - **cancellation**: :meth:`BackgroundTaskSupervisor.cancel_all` cancels every task still running and waits (with a grace period) for them to actually stop. - -See ``plans/first-request/04-core-plan.md`` (decisions #2-#5) for the -design rationale. """ from __future__ import annotations diff --git a/datasette/cli.py b/datasette/cli.py index 7254fe2f..4363a28e 100644 --- a/datasette/cli.py +++ b/datasette/cli.py @@ -678,8 +678,7 @@ def serve( except StartupError as e: raise click.ClickException(e.args[0]) - # --get never launches background tasks (decision #3 in - # plans/first-request/04-core-plan.md): TestClient's request below + # --get never launches background tasks: TestClient's request below # flows through the full ASGI stack, including the # AsgiRunOnFirstRequest fallback, which would otherwise launch them. ds._suppress_background_tasks = True diff --git a/tests/test_background_tasks.py b/tests/test_background_tasks.py index 39dba968..7be9ccbc 100644 --- a/tests/test_background_tasks.py +++ b/tests/test_background_tasks.py @@ -1,8 +1,7 @@ """ Tests for datasette.add_background_task() / start_background_tasks() and the BackgroundTask / BackgroundTaskSupervisor machinery in -datasette/background_tasks.py, per plans/first-request/04-core-plan.md -(decisions #2-#5) and todos/first-request/03-background-tasks-api.md. +datasette/background_tasks.py. """ import asyncio diff --git a/tests/test_cli_serve_get.py b/tests/test_cli_serve_get.py index c4abcfdb..29532902 100644 --- a/tests/test_cli_serve_get.py +++ b/tests/test_cli_serve_get.py @@ -53,8 +53,8 @@ def test_serve_with_get(tmp_path_factory): def test_serve_with_get_does_not_launch_background_tasks(tmp_path_factory): - # Per decision #3 in plans/first-request/04-core-plan.md, --get must - # never launch background tasks, even though its TestClient request + # --get must never launch background tasks, even though its TestClient + # request # flows through the full ASGI stack (including the AsgiRunOnFirstRequest # fallback that would otherwise launch them). The plugin's startup hook # itself still runs (registration happens) - only the launch is