Files
jobboard/app/jobs/__init__.py
T
WolfandClaude Opus 5.5 6b40702a9a Sources tab: searches, company boards and the prune by region, in the app
What a pull reads can now be changed on a page instead of only the command
line: try a search and see its first ten results before saving it, edit or
remove one, follow a company's ATS board, switch any board or search on or
off, and preview and apply a prune by region. Each row shows its open roles
and the countries they are in.

The page and `app companies`/`app searches` call the same functions in
app/jobs/sources.py. Switching a target off closes its open roles, and the
pull's settle closes them again if a batch in flight reopened them. Roles
pulled before `country` existed are backfilled at startup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 15:15:04 +02:00

39 lines
1.6 KiB
Python

"""The work roledesk queues. Importing this package registers every job, every
task in `pipeline.TASKS` and the default schedule in `pipeline.SCHEDULES`.
pull.py read every board and search and store the roles they yield
extract.py title and description into the gate columns, on Haiku
embed.py one vector per open role, for fit
score.py every open role scored for every enabled search agent
cascade.py pull → extract → embed → score, what `TASKS` offers, the
`pull` job a schedule fires, and that schedule
sources.py what a pull reads, changed by hand: boards and searches
added, switched on or off, pruned by region
"""
from __future__ import annotations
from typing import Any
from app.jobs import cascade, embed, extract, pull, score, sources
from app.jobs.pull import search_target, seed_searches
from app.jobs.score import seed_agents
#: What `JobQueue(bootstrap=...)` and `pipeline.worker --bootstrap` are given.
BOOTSTRAP = "app.jobs:bootstrap"
def bootstrap(config_path: str = "") -> tuple[Any, Any]:
"""`(config, store)` from the config file alone, for a job run in its own
process or by `python -m pipeline.worker`. Importing this module is what
fills `JOBS`, which is why the worker is handed a name rather than a queue."""
from app import config as config_mod
from app.storage import Store
config = config_mod.load(config_path or None)
return config, Store(config.database)
__all__ = ["BOOTSTRAP", "bootstrap", "cascade", "embed", "extract", "pull", "score",
"search_target", "seed_agents", "seed_searches", "sources"]