CircularDependencyError (events/handler_graph.py)

crewAI · lib/crewai/src/crewai/events/handler_graph.py · python · MIT
automation

Dependency graph resolution for event handlers. This module resolves handler dependencies into execution levels, ensuring handlers execute in correct order while maximizing parallelism.

# Source: https://github.com/crewAIInc/crewAI | License: MIT | Copyright 2025 crewAI, Inc
# Provided via justclaw.it.com; keep this notice with the code.
"""Dependency graph resolution for event handlers.

This module resolves handler dependencies into execution levels, ensuring
handlers execute in correct order while maximizing parallelism.
"""

from collections import defaultdict, deque
from collections.abc import Sequence
from typing import Any

from crewai.events.depends import Depends
from crewai.events.types.event_bus_types import ExecutionPlan, Handler


class CircularDependencyError(Exception):
    """Exception raised when circular dependencies are detected in event handlers.

    Attributes:
        handlers: The handlers involved in the circular dependency
    """

    def __init

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key