Extra with...transact #126

This commit is contained in:
Ian Renton
2026-08-11 06:07:04 +01:00
parent 9e42e4bd93
commit fbf63bb7ba
+3 -1
View File
@@ -28,8 +28,10 @@ class K0SWE(FileDownloadStaticDataProvider):
break break
# Add to data store # Add to data store
# with transact() batches all writes together to save making thousands of individual sqlite writes
with DATA_STORE.dxcc_data.transact():
for k, v in dxcc_map.items(): for k, v in dxcc_map.items():
DATA_STORE.dxcc_data[k] = v DATA_STORE.dxcc_data.set(k, v)
if self._stop_event.is_set(): if self._stop_event.is_set():
break break