The model batches are isolated with a deadline, so a Kill or a hang ends them
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
c63f348dc9
commit
b73a0fc2cb
6 files changed
+54
-9
No files matched your search
+12
-1
@@ -958,10 +958,21 @@ def test_the_posting_text_is_fetched_once(
|
||||
|
||||
def test_summarise_queues_one_role_and_the_job_writes_it(
|
||||
app: FastAPI, store: Store, monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
"""No lifespan, so no worker: the job waits in the table until drained."""
|
||||
"""No lifespan, so no worker: the job waits in the table until drained.
|
||||
|
||||
`summarise_batch` is `isolate=True` in production, which runs it in a
|
||||
child process that imports `desk.tools.agent` fresh and never sees the
|
||||
stub below. What is under test here is the route and the queue, not
|
||||
isolation itself — that has its own tests in `pipeline/tests` — so the
|
||||
job runs in-thread for this one drain.
|
||||
"""
|
||||
from dataclasses import replace
|
||||
|
||||
from desk.tools import agent
|
||||
from pipeline import JOBS
|
||||
|
||||
monkeypatch.setitem(JOBS, "summarise_batch",
|
||||
replace(JOBS["summarise_batch"], isolate=False, timeout=0.0))
|
||||
client = TestClient(app)
|
||||
store.upsert_role(posting("1"))
|
||||
store.upsert_role(posting("2"))
|
||||
|
||||
Reference in new issue
Block a user