fix: phases update correctly
there was a bug where phases would not update without restarting cb ref: N25B-400
This commit is contained in:
@@ -67,14 +67,14 @@ class BDIProgramManager(BaseAgent):
|
||||
|
||||
await self.send(msg)
|
||||
|
||||
def handle_message(self, msg: InternalMessage):
|
||||
async def handle_message(self, msg: InternalMessage):
|
||||
match msg.thread:
|
||||
case "transition_phase":
|
||||
phases = json.loads(msg.body)
|
||||
|
||||
self._transition_phase(phases["old"], phases["new"])
|
||||
await self._transition_phase(phases["old"], phases["new"])
|
||||
|
||||
def _transition_phase(self, old: str, new: str):
|
||||
async def _transition_phase(self, old: str, new: str):
|
||||
if old != str(self._phase.id):
|
||||
self.logger.warning(
|
||||
f"Phase transition desync detected! ASL requested move from '{old}', "
|
||||
@@ -90,8 +90,8 @@ class BDIProgramManager(BaseAgent):
|
||||
if str(phase.id) == new:
|
||||
self._phase = phase
|
||||
|
||||
self._send_beliefs_to_semantic_belief_extractor()
|
||||
self._send_goals_to_semantic_belief_extractor()
|
||||
await self._send_beliefs_to_semantic_belief_extractor()
|
||||
await self._send_goals_to_semantic_belief_extractor()
|
||||
|
||||
# Notify user interaction agent
|
||||
msg = InternalMessage(
|
||||
|
||||
Reference in New Issue
Block a user