Add database integrations for status and updates modules

This commit is contained in:
Daniel
2019-02-07 20:20:21 +01:00
parent 321f3feec5
commit 12e1eb0917
10 changed files with 182 additions and 26 deletions

View File

@@ -53,7 +53,7 @@ func checkForUpdates() error {
log.Tracef("updates: updating existing files")
updatesLock.RLock()
for identifier, newVersion := range newStableUpdates {
oldVersion, ok := latestUpdates[identifier]
oldVersion, ok := localUpdates[identifier]
if ok && newVersion != oldVersion {
filePath := getVersionedPath(identifier, newVersion)
@@ -84,5 +84,10 @@ func checkForUpdates() error {
log.Warningf("updates: failed to save new version of stable.json: %s", err)
}
// update version status
updatesLock.RLock()
defer updatesLock.RUnlock()
updateStatus(versionClassStable, stableUpdates)
return nil
}