We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2149c0c commit 05fb028Copy full SHA for 05fb028
server/mergin/sync/tasks.py
@@ -7,6 +7,7 @@
7
import os
8
import time
9
from datetime import datetime, timedelta, timezone
10
+from typing import List, Optional
11
from zipfile import ZIP_DEFLATED, ZipFile
12
from flask import current_app
13
@@ -172,8 +173,10 @@ def remove_unused_chunks():
172
173
174
175
@celery.task
-def remove_transaction_chunks(chunks=[]):
176
+def remove_transaction_chunks(chunks: Optional[List[str]] = None):
177
"""Remove chunks related to a specific sync transaction"""
178
+ if not chunks:
179
+ return
180
for chunk in chunks:
181
chunk_path = get_chunk_location(chunk)
182
if os.path.exists(chunk_path):
0 commit comments