Database autoupdates #33
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
girlnamedzero/cldr#33
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If the local database is >= x days old, set by an environment variable, but defaulting to 7 days, cldr should ask the user if they'd like to update it.
Additionally, when the user manually downloads/updates a database (maybe different for each language), ask the user if they want to update it automatically. Maybe migrate the updated_on file to a shared 'general' db file, something like meta-info, which has lines for the last update, whether it should be autoupdated, and any other information from later updates.
Implementation would then proceed as follows:
Try to print the queried page.
Path 1: The page was found, print the page. Then check if the age is over the set value. If it is, check if it should be auto updated, if yes, run the update code.
Path 2: The page was not found. Check if the age is over the set value, then if it should be auto updated, then update it, THEN try to print the page again, if it still wasn't found, exit.
(Note, if plain text is specified, we should consider skipping autoupdates entirely)