diff --git a/providers/activityrefdata/activity_ref_data_provider.py b/providers/activityrefdata/activity_ref_data_provider.py index ec9550a..50fbfb7 100644 --- a/providers/activityrefdata/activity_ref_data_provider.py +++ b/providers/activityrefdata/activity_ref_data_provider.py @@ -38,8 +38,10 @@ class ActivityRefDataProvider: def _add_data(self, new_data): """Add all the provided reference data objects to the data store.""" - # with transact() batches all writes together to save making thousands of individual sqlite writes - with DATA_STORE.activity_refs.transact(): + # with transact() batches all writes together to save making thousands of individual sqlite writes. However, + # that means that each provider holds the lock while it writes, and the default behaviour for other attempted + # transact()s is to fail if they can't get the lock (?!). This behaviour is fixed by retry=True. + with DATA_STORE.activity_refs.transact(retry=True): for d in new_data: DATA_STORE.activity_refs.set(f"{self.sig_name}:{d.id}", d) diff --git a/templates/add_spot.html b/templates/add_spot.html index cfe0150..711fff9 100644 --- a/templates/add_spot.html +++ b/templates/add_spot.html @@ -77,7 +77,7 @@ - + diff --git a/templates/alerts.html b/templates/alerts.html index 3991040..b6dc4d8 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -83,7 +83,7 @@ - + diff --git a/templates/bands.html b/templates/bands.html index 5825e94..f122b5f 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -76,8 +76,8 @@ - - + + diff --git a/templates/base.html b/templates/base.html index 184e8e6..61b7f49 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,6 +1,6 @@ {% extends "skeleton.html" %} {% block head_extra %} - + @@ -16,10 +16,10 @@ window.fetchEventSource = fetchEventSource; - - - - + + + + {% end %} {% block body %}
diff --git a/templates/conditions.html b/templates/conditions.html index f91d21d..e19356e 100644 --- a/templates/conditions.html +++ b/templates/conditions.html @@ -284,7 +284,7 @@
- + diff --git a/templates/map.html b/templates/map.html index a9443b1..8aaa27e 100644 --- a/templates/map.html +++ b/templates/map.html @@ -113,8 +113,8 @@ const CARTODB_API_KEY = "{{ web_ui_options.get('cartodb_api_key', '') }}"; - - + + diff --git a/templates/spots.html b/templates/spots.html index 94ab0b3..752f9f8 100644 --- a/templates/spots.html +++ b/templates/spots.html @@ -125,8 +125,8 @@ - - + + diff --git a/templates/status.html b/templates/status.html index 91d3d27..5719e1b 100644 --- a/templates/status.html +++ b/templates/status.html @@ -96,7 +96,7 @@ - +