Merge branch 'feat/collaboration2' of github.com:langgenius/dify into feat/collaboration2

This commit is contained in:
hjlarry
2026-01-19 21:54:01 +08:00
3 changed files with 4 additions and 12 deletions

View File

@ -135,9 +135,7 @@ class WorkflowCollaborationRepository:
return self._decode(raw)
def set_leader_if_absent(self, workflow_id: str, sid: str) -> bool:
return bool(
self._redis.set(self.leader_key(workflow_id), sid, nx=True, ex=SESSION_STATE_TTL_SECONDS)
)
return bool(self._redis.set(self.leader_key(workflow_id), sid, nx=True, ex=SESSION_STATE_TTL_SECONDS))
def set_leader(self, workflow_id: str, sid: str) -> None:
self._redis.set(self.leader_key(workflow_id), sid, ex=SESSION_STATE_TTL_SECONDS)