mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 22:29:07 +00:00
Pass database as argument to individual face_detector functions
This allows the face detector to use transactions, such that faces can be detected on media that has not been fully commited yet. This solves #214
This commit is contained in:
@@ -361,7 +361,7 @@ func (r *mutationResolver) UserRemoveRootAlbum(ctx context.Context, userID int,
|
||||
return err
|
||||
}
|
||||
|
||||
if err := face_detection.GlobalFaceDetector.ReloadFacesFromDatabase(); err != nil {
|
||||
if err := face_detection.GlobalFaceDetector.ReloadFacesFromDatabase(tx); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user