Files
jobboard/roledesk/jobs/__init__.py
T
WolfandClaude Opus 5.5 36dbcbb29e Skeleton: roledesk on desk and pipeline from ../news
Package layers models, config, storage, jobs, web, cli, held by
tests/test_architecture.py with desk and pipeline as external trees and
plugins/ limited to desk. roles.yaml is the default config, roledesk.db
its own file, port 8790. create_app mounts pipeline.web.connect over
Jobs(config.database); `roledesk job pull` drains a no-op pull and
`roledesk db init` creates the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 10:59:17 +02:00

25 lines
766 B
Python

"""The work roledesk queues. Importing this package registers every job.
pull.py read every configured plugin and store the roles it yields
"""
from __future__ import annotations
from roledesk.jobs import pull
#: What `JobQueue(bootstrap=...)` and `pipeline.worker --bootstrap` are given.
BOOTSTRAP = "roledesk.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 roledesk import config as config_mod
from roledesk.storage import Store
config = config_mod.load(config_path or None)
return config, Store(config.database)
__all__ = ["BOOTSTRAP", "bootstrap", "pull"]