GODT-2305: Detect missing gluon DB

This commit is contained in:
James Houlahan
2023-01-25 14:48:30 +01:00
parent e7dea0a77f
commit cf32b84257
4 changed files with 26 additions and 43 deletions

View File

@ -475,6 +475,14 @@ func (user *User) OnStatusDown(context.Context) {
user.abortable.Abort()
}
// ClearSyncStatus clears the sync status of the user. This triggers a resync.
func (user *User) ClearSyncStatus() error {
user.abortable.Abort()
defer user.goSync()
return user.vault.ClearSyncStatus()
}
// Logout logs the user out from the API.
func (user *User) Logout(ctx context.Context, withAPI bool) error {
user.log.WithField("withAPI", withAPI).Info("Logging out user")