The boilerplate's rule: the deploy kit's Dockerfile, the APP_CONFIG, APP_PASSWORD and APP_DATA variables and its commands all assume a package called app, so a project renames its display title and nothing else. The console script is `app`, and the launch entry runs `uv run app serve --port 8790`. The domain noun stays `role`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
1.2 KiB
Python
32 lines
1.2 KiB
Python
"""The work roledesk queues. Importing this package registers every job and
|
|
every task in `pipeline.TASKS`.
|
|
|
|
pull.py read every configured plugin and store the roles it yields
|
|
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, and what `TASKS` offers
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from app.jobs import cascade, embed, extract, pull, score
|
|
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[object, object]:
|
|
"""roledesk's `(config, store)` from the config file alone, for a job run
|
|
in its own process or by `python -m pipeline.worker`."""
|
|
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",
|
|
"seed_agents"]
|