Drop pruning boards by region: a fix for the US seed, and a wrong one
`app companies prune`, `/api/prune` and the Sources disclosure switched off every board with no open role in a region. It existed because the first seed was 186 US boards; the European seed makes it moot, and it was wrong on its own terms: a board with no European role today (a company between openings, or a fetch that timed out) was switched off for good. A company that hires nowhere near should not be in the list, and a ranking's country gate handles the rest. `EUROPE` in models had no other reader and goes with it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
3aee48997c
commit
e602eb3388
12 files changed
+11
-233
No files matched your search
@@ -463,31 +463,6 @@ def add_board(body: BoardBody, store: StoreDep) -> dict[str, Any]:
|
||||
return {"source": _one_source(store, sub.id), "found": found}
|
||||
|
||||
|
||||
@router.get("/prune")
|
||||
def prune_preview(store: StoreDep, region: str = "europe") -> dict[str, Any]:
|
||||
"""The boards a prune would switch off: every one on, none of whose open
|
||||
roles is in the region."""
|
||||
try:
|
||||
_, plan = jobs.sources.prune_plan(store, region)
|
||||
except ValueError as exc:
|
||||
raise HTTPException(422, str(exc)) from exc
|
||||
return {"region": region, "boards": [{"id": sub.id, "label": sub.label,
|
||||
"target": sub.target, "open_roles": n}
|
||||
for sub, n in plan]}
|
||||
|
||||
|
||||
class PruneBody(BaseModel):
|
||||
region: str = "europe"
|
||||
|
||||
|
||||
@router.post("/prune")
|
||||
def prune(body: PruneBody, store: StoreDep) -> dict[str, Any]:
|
||||
try:
|
||||
return jobs.sources.prune(store, body.region)
|
||||
except ValueError as exc:
|
||||
raise HTTPException(422, str(exc)) from exc
|
||||
|
||||
|
||||
# ----------------------------------------------------------- applications
|
||||
|
||||
class SaveBody(BaseModel):
|
||||
|
||||
Reference in new issue
Block a user