You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue
The current GitHub action will call the Update Data every 10 minutes. The code in lockdown/backend/src/loaders/lockdown/lockdown.js batchGetTerritoriesEntryData() is called in "Update Data" action.
This code parses the Data Set Entry GSheet, recreate the JSONs and reinsert them into CosmosDB (MongoDB), clearing the DB first. This generates a huge amount of unnecessary inserts. We want to do the clear DB and entire parse only once each half hour, and every 10 minutes, just the updates.
The entire parse is necessary to ensure that the bug fix by this code change 2590e30 remains fixed, i.e. delete country entries where entries are blank.
Possible solution
Two methods are possible:
Create 2 GitHub action, each half hour run the function with parameter to clear data in DB and regenerate JSONs. every 10 mins in the half hour, just the updates (function with no parameter).
Keep an environment variable storing is the timestamp of the last clear all run. If more than half hour, clear data in DB and regenerate JSONs, otherwise just update without clear.
(Daphne's ref: June 25 convo with Mark)
The text was updated successfully, but these errors were encountered:
Issue
The current GitHub action will call the Update Data every 10 minutes. The code in lockdown/backend/src/loaders/lockdown/lockdown.js batchGetTerritoriesEntryData() is called in "Update Data" action.
This code parses the Data Set Entry GSheet, recreate the JSONs and reinsert them into CosmosDB (MongoDB), clearing the DB first. This generates a huge amount of unnecessary inserts. We want to do the clear DB and entire parse only once each half hour, and every 10 minutes, just the updates.
The entire parse is necessary to ensure that the bug fix by this code change 2590e30 remains fixed, i.e. delete country entries where entries are blank.
Possible solution
Two methods are possible:
Create 2 GitHub action, each half hour run the function with parameter to clear data in DB and regenerate JSONs. every 10 mins in the half hour, just the updates (function with no parameter).
Keep an environment variable storing is the timestamp of the last clear all run. If more than half hour, clear data in DB and regenerate JSONs, otherwise just update without clear.
(Daphne's ref: June 25 convo with Mark)
The text was updated successfully, but these errors were encountered: