소스 검색

Avoid locking the DB when there are no subitems to insert

master
JustAnotherArchivist 3 년 전
부모
커밋
168fa78736
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -2
      qwarc/__init__.py

+ 2
- 2
qwarc/__init__.py 파일 보기

@@ -307,8 +307,8 @@ class QWARC:
self._tasks = pending

async def _insert_subitems(self, item):
async with self.exclusive_db_lock() as cursor:
if item.childItems:
if item.childItems:
async with self.exclusive_db_lock() as cursor:
it = iter(item.childItems)
while True:
values = [(t, v, STATUS_TODO) for t, v in itertools.islice(it, 100000)]


불러오는 중...
취소
저장