feat(agent-office): service_proxy pipeline_retry/list_failed_pipelines (+ music-lab status=failed 필터)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1135,6 +1135,21 @@ def list_pipelines(active_only: bool = False) -> List[Dict[str, Any]]:
|
||||
return [_parse_pipeline_row(r) for r in rows]
|
||||
|
||||
|
||||
def list_pipelines_by_state(state: str) -> List[Dict[str, Any]]:
|
||||
"""특정 state의 파이프라인만 조회 (예: 'failed')."""
|
||||
sql = """
|
||||
SELECT vp.*, ml.title AS track_title, cj.title AS compile_title
|
||||
FROM video_pipelines vp
|
||||
LEFT JOIN music_library ml ON ml.id = vp.track_id
|
||||
LEFT JOIN compile_jobs cj ON cj.id = vp.compile_job_id
|
||||
WHERE vp.state = ?
|
||||
ORDER BY vp.created_at DESC
|
||||
"""
|
||||
with _conn() as conn:
|
||||
rows = conn.execute(sql, (state,)).fetchall()
|
||||
return [_parse_pipeline_row(r) for r in rows]
|
||||
|
||||
|
||||
def increment_feedback_count(pid: int, step: str) -> int:
|
||||
"""원자적으로 feedback_count_per_step.<step>를 +1 한 뒤 새 값을 반환.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user