Skip to content

Commit 2d8c50f

Browse files
a7m-1stWendong-Fan
andauthored
fix: revert the cause of workforce reset runtime error bug (#3467)
Co-authored-by: Wendong-Fan <[email protected]>
1 parent 7af55a3 commit 2d8c50f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

camel/societies/workforce/workforce.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2188,7 +2188,11 @@ async def handle_decompose_append_task(
21882188
)
21892189
return [task]
21902190

2191-
self.reset()
2191+
if reset and self._state != WorkforceState.RUNNING:
2192+
self.reset()
2193+
logger.info("Workforce reset before handling task.")
2194+
2195+
# Focus on the new task
21922196
self._task = task
21932197
task.state = TaskState.FAILED
21942198

0 commit comments

Comments
 (0)