fix(conductor): Apply review suggestions for track 'mma_data_architecture_dag_engine'
This commit is contained in:
17
gui_2.py
17
gui_2.py
@@ -2088,11 +2088,24 @@ class App:
|
||||
track_id = f"track_{uuid.uuid4().hex[:8]}"
|
||||
track = Track(id=track_id, description=title, tickets=tickets)
|
||||
|
||||
# 4. Initialize ConductorEngine and run_linear loop
|
||||
# Initialize track state in the filesystem
|
||||
from models import TrackState, Metadata
|
||||
from datetime import datetime
|
||||
now = datetime.now()
|
||||
meta = Metadata(id=track_id, name=title, status="todo", created_at=now, updated_at=now)
|
||||
state = TrackState(metadata=meta, discussion=[], tasks=tickets)
|
||||
project_manager.save_track_state(track_id, state, self.ui_files_base_dir)
|
||||
|
||||
# 4. Initialize ConductorEngine and run loop
|
||||
engine = multi_agent_conductor.ConductorEngine(track, self.event_queue)
|
||||
|
||||
# Use current full markdown context for the track execution
|
||||
track_id_param = track.id
|
||||
flat = project_manager.flat_config(self.project, self.active_discussion, track_id=track_id_param)
|
||||
full_md, _, _ = aggregate.run(flat)
|
||||
|
||||
# Schedule the coroutine on the internal event loop
|
||||
asyncio.run_coroutine_threadsafe(engine.run_linear(), self._loop)
|
||||
asyncio.run_coroutine_threadsafe(engine.run(md_content=full_md), self._loop)
|
||||
except Exception as e:
|
||||
self.ai_status = f"Track start error: {e}"
|
||||
print(f"ERROR in _start_track_logic: {e}")
|
||||
|
||||
Reference in New Issue
Block a user