mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-02 15:52:34 +00:00
Refactor task events to use base CrewEvent
- Move CrewEvent import from crew_events to base_events - Remove unnecessary blank lines in task_events.py - Simplify event class structure for task-related events
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
from crewai.tasks.task_output import TaskOutput
|
from crewai.tasks.task_output import TaskOutput
|
||||||
from crewai.utilities.events.crew_events import CrewEvent
|
from crewai.utilities.events.base_events import CrewEvent
|
||||||
|
|
||||||
|
|
||||||
class TaskStartedEvent(CrewEvent):
|
class TaskStartedEvent(CrewEvent):
|
||||||
@@ -11,7 +11,6 @@ class TaskStartedEvent(CrewEvent):
|
|||||||
context: Optional[str]
|
context: Optional[str]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class TaskCompletedEvent(CrewEvent):
|
class TaskCompletedEvent(CrewEvent):
|
||||||
"""Event emitted when a task completes"""
|
"""Event emitted when a task completes"""
|
||||||
|
|
||||||
@@ -19,7 +18,6 @@ class TaskCompletedEvent(CrewEvent):
|
|||||||
type: str = "task_completed"
|
type: str = "task_completed"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class TaskFailedEvent(CrewEvent):
|
class TaskFailedEvent(CrewEvent):
|
||||||
"""Event emitted when a task fails"""
|
"""Event emitted when a task fails"""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user