Sync storage every second
This commit is contained in:
parent
6864d90cca
commit
b71def6cf3
4
state.go
4
state.go
|
@ -60,5 +60,9 @@ func KeepStatePersisted() {
|
|||
for {
|
||||
<-t.C
|
||||
SaveState()
|
||||
err := storage.Sync(false)
|
||||
if err != nil {
|
||||
Error(err, "Failed to sync storage")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ func CloseStorage() {
|
|||
|
||||
err = storage.Sync(true)
|
||||
if err != nil {
|
||||
Error(err, "Failed to sync storage")
|
||||
Error(err, "Failed to sync storage (hard)")
|
||||
} else {
|
||||
Log("Storage synchronized")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue