feat(scheduler): read CF_ORCH_URL env var for coordinator address
Some checks failed
CI / test (push) Failing after 19s

Threads coordinator_url from CF_ORCH_URL env var (default localhost:7700)
into the cfcore TaskScheduler so Docker instances can point at
host.docker.internal:7700 instead of the container's own loopback.

Also adds CF_ORCH_URL to compose.test-cfcore.yml and mounts persistent
patched configs (llm.docker.yaml, user.docker.yaml) for the test instance.
This commit is contained in:
pyr0ball 2026-04-01 11:06:38 -07:00
parent a8b08f3a45
commit d00d74d994
2 changed files with 11 additions and 0 deletions

View file

@ -22,10 +22,14 @@ services:
- "8516:8501"
volumes:
- /devl/job-seeker:/devl/job-seeker
- /devl/job-seeker/config:/app/config
- /devl/job-seeker/config/llm.docker.yaml:/app/config/llm.yaml:ro
- /devl/job-seeker/config/user.docker.yaml:/app/config/user.yaml:ro
environment:
- STAGING_DB=/devl/job-seeker/staging.db
- PYTHONUNBUFFERED=1
- STREAMLIT_SERVER_BASE_URL_PATH=
- CF_ORCH_URL=http://host.docker.internal:7700
extra_hosts:
- "host.docker.internal:host-gateway"
restart: "no"

View file

@ -15,6 +15,7 @@ Public API (unchanged — callers do not need to change):
from __future__ import annotations
import logging
import os
import threading
from pathlib import Path
from typing import Callable, Optional
@ -112,6 +113,10 @@ class TaskScheduler(_CoreTaskScheduler):
"defaulting to 0.0 GB (unlimited concurrency for this type)", t
)
coordinator_url = os.environ.get(
"CF_ORCH_URL", "http://localhost:7700"
).rstrip("/")
super().__init__(
db_path=db_path,
run_task_fn=run_task_fn,
@ -119,6 +124,8 @@ class TaskScheduler(_CoreTaskScheduler):
vram_budgets=budgets,
available_vram_gb=available_vram,
max_queue_depth=max_depth,
coordinator_url=coordinator_url,
service_name="peregrine",
)
def enqueue(