refactor:clean annotations in GC

This commit is contained in:
Deluan
2020-02-01 12:15:12 -05:00
committed by Deluan Quintão
parent 88e01d05f6
commit 0d0787e656
4 changed files with 26 additions and 1 deletions
+13 -1
View File
@@ -126,7 +126,19 @@ func (db *NewSQLStore) GC(ctx context.Context) error {
if err != nil {
return err
}
return db.Artist(ctx).(*artistRepository).cleanSearchIndex()
err = db.Artist(ctx).(*artistRepository).cleanSearchIndex()
if err != nil {
return err
}
err = db.MediaFile(ctx).(*mediaFileRepository).cleanAnnotations()
if err != nil {
return err
}
err = db.Album(ctx).(*albumRepository).cleanAnnotations()
if err != nil {
return err
}
return db.Artist(ctx).(*artistRepository).cleanAnnotations()
}
func (db *NewSQLStore) getOrmer() orm.Ormer {