Skip to content

Commit 007da34

Browse files
committed
fix: workflow continue error
1 parent 562c49c commit 007da34

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/backend/bisheng/chat/clients/workflow_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ async def check_status(self, message: dict, is_init: bool = False) -> (bool, str
129129

130130
async def get_execute_worker(self) -> Optional[str]:
131131
if not self.hash_key:
132-
return None
132+
self.hash_key = self.chat_id if self.chat_id else generate_uuid()
133133
return await workflow_stateful_worker.find_task_node(self.hash_key)
134134

135135
async def init_workflow(self, message: dict):
@@ -147,7 +147,6 @@ async def init_workflow(self, message: dict):
147147
await self.workflow.async_set_workflow_data(workflow_data)
148148
await self.workflow.async_set_workflow_status(WorkflowStatus.WAITING.value)
149149
# Start asynchronous task
150-
self.hash_key = self.chat_id if self.chat_id else generate_uuid()
151150

152151
execute_workflow.apply_async([unique_id, workflow_id, self.chat_id, self.user_id],
153152
queue=await self.get_execute_worker())

0 commit comments

Comments
 (0)