Stateless Reducer
-
이코에코(Eco²) Clean Architecture #14: Stateless Reducer Pattern + 체크포인팅이코에코(Eco²)/Clean Architecture Migration 2026. 1. 6. 01:12
작성일: 2026-01-06참조: Stateless Reducer Pattern 이론1. 도입 배경1.1 기존 파이프라인의 문제Scan Worker의 4단계 파이프라인(Vision → Rule → Answer → Reward)은 Celery Chain으로 구현되어 있었다. 각 Task가 직접 이벤트를 발행하고, 에러를 처리하고, 다음 Task로 데이터를 전달했다.# 기존 방식 (문제점)@celery_app.taskdef vision_task(task_id, image_url, ...): try: publish_event("vision", "started") # Side effect 1 result = openai.chat.completions.create(...) # 외..