mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-08-11 15:11:41 +00:00
Extra with...transact #126
This commit is contained in:
@@ -28,11 +28,13 @@ class K0SWE(FileDownloadStaticDataProvider):
|
|||||||
break
|
break
|
||||||
|
|
||||||
# Add to data store
|
# Add to data store
|
||||||
for k, v in dxcc_map.items():
|
# with transact() batches all writes together to save making thousands of individual sqlite writes
|
||||||
DATA_STORE.dxcc_data[k] = v
|
with DATA_STORE.dxcc_data.transact():
|
||||||
|
for k, v in dxcc_map.items():
|
||||||
|
DATA_STORE.dxcc_data.set(k, v)
|
||||||
|
|
||||||
if self._stop_event.is_set():
|
if self._stop_event.is_set():
|
||||||
break
|
break
|
||||||
|
|
||||||
# Regenerate in-memory regex-to-DXCC-entity-code map.
|
# Regenerate in-memory regex-to-DXCC-entity-code map.
|
||||||
DATA_STORE.regenerate_call_regex_to_dxcc_entity_map()
|
DATA_STORE.regenerate_call_regex_to_dxcc_entity_map()
|
||||||
|
|||||||
Reference in New Issue
Block a user