Prune stale plugin metadata
This commit is contained in:
@@ -308,7 +308,7 @@ func runtimeMetadataPath(path string) string {
|
||||
}
|
||||
|
||||
func (store *FileStore) snapshot() StoreSnapshot {
|
||||
return StoreSnapshot{
|
||||
return normalizeStoreSnapshot(StoreSnapshot{
|
||||
Users: snapshotRepository(store.MemoryStore.users),
|
||||
AuthSessions: snapshotRepository(store.MemoryStore.authSessions),
|
||||
RunControlSessions: snapshotRepository(store.MemoryStore.runSessions),
|
||||
@@ -337,7 +337,7 @@ func (store *FileStore) snapshot() StoreSnapshot {
|
||||
SCUMVehicles: snapshotRepository(store.MemoryStore.scumVehicles),
|
||||
SCUMVehicleTrajectories: snapshotRepository(store.MemoryStore.scumVehicleTracks),
|
||||
SCUMVehicleLocks: snapshotRepository(store.MemoryStore.scumVehicleLocks),
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func (store *FileStore) runtimeSnapshot() runtimeSnapshot {
|
||||
@@ -349,6 +349,7 @@ func (store *FileStore) runtimeSnapshot() runtimeSnapshot {
|
||||
}
|
||||
|
||||
func (store *FileStore) loadSnapshot(snapshot StoreSnapshot) {
|
||||
snapshot = normalizeStoreSnapshot(snapshot)
|
||||
loadRepository(store.MemoryStore.users, snapshot.Users)
|
||||
loadRepository(store.MemoryStore.authSessions, snapshot.AuthSessions)
|
||||
loadRepository(store.MemoryStore.runSessions, snapshot.RunControlSessions)
|
||||
|
||||
Reference in New Issue
Block a user