detect_pending_interrupts(
graph: Runnable[Any, Any],
config: RunnableConfig
) -> tuple| Name | Type | Description |
|---|---|---|
graph* | Runnable[Any, Any] | |
config* | RunnableConfig |
Return the interrupts pending on the checkpointed state, if any.
StateSnapshot.interrupts accumulates every interrupt recorded on the
checkpoint and is not pruned as they are answered, so after a partial
resume of parallel interrupts it may still report the ones already
satisfied. Deriving the list from StateSnapshot.tasks and skipping
tasks that produced node output keeps the initial lookup aligned with
what is outstanding in the common case. After a graph invocation,
:func:track_pending_interrupts provides the authoritative active set.
The runnable to inspect. Runnables without an aget_state
method have no checkpointed interrupts and return an empty tuple.
The :class:RunnableConfig identifying the thread.