mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-04-15 23:42:37 +00:00
fix: bump uv-pre-commit to 0.11.3, distinguish checkpoint resume
- Bump uv-pre-commit from 0.9.3 to 0.11.3 to support relative exclude-newer values in pyproject.toml - Use checkpoint_kickoff_event_id to detect resume, preventing second kickoff() from skipping tasks or suppressing events
This commit is contained in:
@@ -21,7 +21,7 @@ repos:
|
||||
types: [python]
|
||||
exclude: ^(lib/crewai/src/crewai/cli/templates/|lib/crewai/tests/|lib/crewai-tools/tests/|lib/crewai-files/tests/)
|
||||
- repo: https://github.com/astral-sh/uv-pre-commit
|
||||
rev: 0.9.3
|
||||
rev: 0.11.3
|
||||
hooks:
|
||||
- id: uv-lock
|
||||
- repo: https://github.com/commitizen-tools/commitizen
|
||||
|
||||
@@ -1298,6 +1298,8 @@ class Crew(FlowTrackable, BaseModel):
|
||||
manager.crew = self
|
||||
|
||||
def _get_execution_start_index(self, tasks: list[Task]) -> int | None:
|
||||
if self.checkpoint_kickoff_event_id is None:
|
||||
return None
|
||||
for i, task in enumerate(tasks):
|
||||
if task.output is None:
|
||||
return i if i > 0 else None
|
||||
|
||||
@@ -284,7 +284,7 @@ def prepare_kickoff(
|
||||
)
|
||||
from crewai.events.types.crew_events import CrewKickoffStartedEvent
|
||||
|
||||
resuming = crew._kickoff_event_id is not None
|
||||
resuming = crew.checkpoint_kickoff_event_id is not None
|
||||
|
||||
if not resuming and get_current_parent_id() is None:
|
||||
reset_emission_counter()
|
||||
|
||||
Reference in New Issue
Block a user