mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-10-10 21:26:01 +02:00
Fix document lock acquisition for user group sync
This commit is contained in:
@@ -25,8 +25,7 @@ def _sync_user_group_batch(
|
|||||||
logger.debug(f"Syncing document sets for: {document_ids}")
|
logger.debug(f"Syncing document sets for: {document_ids}")
|
||||||
|
|
||||||
# Acquires a lock on the documents so that no other process can modify them
|
# Acquires a lock on the documents so that no other process can modify them
|
||||||
prepare_to_modify_documents(db_session=db_session, document_ids=document_ids)
|
with prepare_to_modify_documents(db_session=db_session, document_ids=document_ids):
|
||||||
|
|
||||||
# get current state of document sets for these documents
|
# get current state of document sets for these documents
|
||||||
document_id_to_access = get_access_for_documents(
|
document_id_to_access = get_access_for_documents(
|
||||||
document_ids=document_ids, db_session=db_session
|
document_ids=document_ids, db_session=db_session
|
||||||
|
Reference in New Issue
Block a user