mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2026-02-05 02:16:46 +00:00
* set hatchet as default for multitracks * fix: pipeline routing tests for hatchet-default branch - Create room with use_celery=True to force Celery backend in tests - Link transcript to room to enable multitrack pipeline routing - Fixes test failures caused by missing HATCHET_CLIENT_TOKEN in test env * Update server/reflector/services/transcript_process.py Co-authored-by: pr-agent-monadical[bot] <198624643+pr-agent-monadical[bot]@users.noreply.github.com> --------- Co-authored-by: Igor Loskutov <igor.loskutoff@gmail.com> Co-authored-by: pr-agent-monadical[bot] <198624643+pr-agent-monadical[bot]@users.noreply.github.com>
44 lines
1.0 KiB
Python
44 lines
1.0 KiB
Python
"""
|
|
CPU-heavy worker pool for audio processing tasks.
|
|
Handles ONLY: mixdown_tracks
|
|
|
|
Configuration:
|
|
- slots=1: Only mixdown (already serialized globally with max_runs=1)
|
|
- Worker affinity: pool=cpu-heavy
|
|
"""
|
|
|
|
from reflector.hatchet.client import HatchetClientManager
|
|
from reflector.hatchet.workflows.daily_multitrack_pipeline import (
|
|
daily_multitrack_pipeline,
|
|
)
|
|
from reflector.logger import logger
|
|
|
|
|
|
def main():
|
|
hatchet = HatchetClientManager.get_client()
|
|
|
|
logger.info(
|
|
"Starting Hatchet CPU worker pool (mixdown only)",
|
|
worker_name="cpu-worker-pool",
|
|
slots=1,
|
|
labels={"pool": "cpu-heavy"},
|
|
)
|
|
|
|
cpu_worker = hatchet.worker(
|
|
"cpu-worker-pool",
|
|
slots=1, # Only 1 mixdown at a time (already serialized globally)
|
|
labels={
|
|
"pool": "cpu-heavy",
|
|
},
|
|
workflows=[daily_multitrack_pipeline],
|
|
)
|
|
|
|
try:
|
|
cpu_worker.start()
|
|
except KeyboardInterrupt:
|
|
logger.info("Received shutdown signal, stopping CPU workers...")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|