mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-03 08:12:39 +00:00
Refactor event handling and introduce new event types
- Migrate from global `emit` function to `event_bus.emit` - Add new event types for task failures, tool usage, and agent execution - Update event listeners and event bus to support more granular event tracking - Remove deprecated event emission methods - Improve event type consistency and add more detailed event information
This commit is contained in:
@@ -20,3 +20,11 @@ class TaskCompleted(CrewEvent):
|
||||
type: str = "task_completed"
|
||||
|
||||
model_config = {"arbitrary_types_allowed": True}
|
||||
|
||||
|
||||
class TaskFailed(CrewEvent):
|
||||
"""Event emitted when a task fails"""
|
||||
|
||||
task: Any
|
||||
error: str
|
||||
type: str = "task_failed"
|
||||
|
||||
Reference in New Issue
Block a user