Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -680,7 +680,6 @@ async def consume_loop():
|
|
| 680 |
except Exception as e:
|
| 681 |
logger.error(f"[KAFKA] analysis failed analysisId={analysis_id}: {repr(e)}", exc_info=True)
|
| 682 |
await produce_progress(analysis_id, user_id, 100, "ERROR", f"오류: {type(e).__name__}")
|
| 683 |
-
"에러 결과"로 반드시 보내기 (프론트 로딩 종료용)
|
| 684 |
if producer:
|
| 685 |
err_payload = {
|
| 686 |
"analysisId": analysis_id,
|
|
@@ -690,7 +689,7 @@ async def consume_loop():
|
|
| 690 |
"message": f"분석 실패: {type(e).__name__}",
|
| 691 |
"url": url,
|
| 692 |
}
|
| 693 |
-
|
| 694 |
await producer.send_and_wait(
|
| 695 |
KAFKA_DONE_TOPIC,
|
| 696 |
key=analysis_id.encode("utf-8"),
|
|
|
|
| 680 |
except Exception as e:
|
| 681 |
logger.error(f"[KAFKA] analysis failed analysisId={analysis_id}: {repr(e)}", exc_info=True)
|
| 682 |
await produce_progress(analysis_id, user_id, 100, "ERROR", f"오류: {type(e).__name__}")
|
|
|
|
| 683 |
if producer:
|
| 684 |
err_payload = {
|
| 685 |
"analysisId": analysis_id,
|
|
|
|
| 689 |
"message": f"분석 실패: {type(e).__name__}",
|
| 690 |
"url": url,
|
| 691 |
}
|
| 692 |
+
}
|
| 693 |
await producer.send_and_wait(
|
| 694 |
KAFKA_DONE_TOPIC,
|
| 695 |
key=analysis_id.encode("utf-8"),
|