mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-07 10:17:50 +02:00
Include exception traceback in run_with_retry logging
This commit is contained in:
@@ -3,6 +3,7 @@ import logging
|
||||
import random
|
||||
import time
|
||||
from typing import Optional
|
||||
import traceback
|
||||
|
||||
from langgraph.pregel.types import PregelExecutableTask, RetryPolicy
|
||||
|
||||
@@ -49,7 +50,9 @@ def run_with_retry(
|
||||
)
|
||||
# log the retry
|
||||
logger.info(
|
||||
f"Retrying task {task.name} after {interval:.2f} seconds (attempt {attempts}) after {exc.__class__.__name__} {exc}"
|
||||
f"Retrying task {task.name} after {interval:.2f} seconds (attempt {attempts}) due to:\n"
|
||||
f"{exc.__class__.__name__}: {exc}\n"
|
||||
f"{traceback.format_exc()}"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user