Use Celery task logger for debug
This commit is contained in:
@@ -175,13 +175,14 @@ def create_cid_primitives(actor_id: Optional[str] = None):
|
|||||||
|
|
||||||
Returns dict of primitives that resolve CIDs before creating sources.
|
Returns dict of primitives that resolve CIDs before creating sources.
|
||||||
"""
|
"""
|
||||||
import warnings
|
from celery.utils.log import get_task_logger
|
||||||
|
cid_logger = get_task_logger(__name__)
|
||||||
def prim_make_video_source_cid(cid: str, fps: float = 30):
|
def prim_make_video_source_cid(cid: str, fps: float = 30):
|
||||||
warnings.warn(f"DEBUG: CID-aware make-video-source: cid={cid}, actor_id={actor_id}")
|
cid_logger.warning(f"DEBUG: CID-aware make-video-source: cid={cid}, actor_id={actor_id}")
|
||||||
return CIDVideoSource(cid, fps, actor_id)
|
return CIDVideoSource(cid, fps, actor_id)
|
||||||
|
|
||||||
def prim_make_audio_analyzer_cid(cid: str):
|
def prim_make_audio_analyzer_cid(cid: str):
|
||||||
warnings.warn(f"DEBUG: CID-aware make-audio-analyzer: cid={cid}, actor_id={actor_id}")
|
cid_logger.warning(f"DEBUG: CID-aware make-audio-analyzer: cid={cid}, actor_id={actor_id}")
|
||||||
return CIDAudioAnalyzer(cid, actor_id)
|
return CIDAudioAnalyzer(cid, actor_id)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -274,11 +275,12 @@ def run_stream(
|
|||||||
|
|
||||||
# Override primitives with CID-aware versions
|
# Override primitives with CID-aware versions
|
||||||
cid_prims = create_cid_primitives(actor_id)
|
cid_prims = create_cid_primitives(actor_id)
|
||||||
import warnings
|
from celery.utils.log import get_task_logger
|
||||||
warnings.warn(f"DEBUG: Overriding primitives: {list(cid_prims.keys())}")
|
task_logger = get_task_logger(__name__)
|
||||||
warnings.warn(f"DEBUG: Primitives before: {list(interp.primitives.keys())[:10]}...")
|
task_logger.warning(f"DEBUG: Overriding primitives: {list(cid_prims.keys())}")
|
||||||
|
task_logger.warning(f"DEBUG: Primitives before: {list(interp.primitives.keys())[:10]}...")
|
||||||
interp.primitives.update(cid_prims)
|
interp.primitives.update(cid_prims)
|
||||||
warnings.warn(f"DEBUG: streaming:make-video-source is now: {type(interp.primitives.get('streaming:make-video-source'))}")
|
task_logger.warning(f"DEBUG: streaming:make-video-source is now: {type(interp.primitives.get('streaming:make-video-source'))}")
|
||||||
|
|
||||||
# Run rendering to file
|
# Run rendering to file
|
||||||
logger.info(f"Rendering to {output_path}")
|
logger.info(f"Rendering to {output_path}")
|
||||||
|
|||||||
Reference in New Issue
Block a user