Prune stale plugin metadata
This commit is contained in:
@@ -264,7 +264,7 @@ ON DUPLICATE KEY UPDATE snapshot_json = ?, updated_at = CURRENT_TIMESTAMP`, mysq
|
||||
}
|
||||
|
||||
func (store *MySQLStore) snapshot() StoreSnapshot {
|
||||
return StoreSnapshot{
|
||||
return normalizeStoreSnapshot(StoreSnapshot{
|
||||
Users: snapshotRepository(store.MemoryStore.users),
|
||||
AuthSessions: snapshotRepository(store.MemoryStore.authSessions),
|
||||
RunControlSessions: snapshotRepository(store.MemoryStore.runSessions),
|
||||
@@ -293,7 +293,7 @@ func (store *MySQLStore) snapshot() StoreSnapshot {
|
||||
SCUMVehicles: snapshotRepository(store.MemoryStore.scumVehicles),
|
||||
SCUMVehicleTrajectories: snapshotRepository(store.MemoryStore.scumVehicleTracks),
|
||||
SCUMVehicleLocks: snapshotRepository(store.MemoryStore.scumVehicleLocks),
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func (store *MySQLStore) runtimeSnapshot() runtimeSnapshot {
|
||||
@@ -305,6 +305,7 @@ func (store *MySQLStore) runtimeSnapshot() runtimeSnapshot {
|
||||
}
|
||||
|
||||
func (store *MySQLStore) 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