Merge pull request #12121 from kobergj/DontIndexFailedUploads
Dont Index failed uploads
This commit is contained in:
2 files changed
+10
No files matched your search
@@ -0,0 +1,7 @@
|
||||
Bugfix: Don't index failed uploads
|
||||
|
||||
The search service was indexing uploads even when they failed. This caused
|
||||
unnecessary index operations for incomplete or errored file transfers. The fix
|
||||
skips indexing when the UploadReady event indicates the upload has failed.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12121
|
||||
@@ -87,6 +87,9 @@ func HandleEvents(s Searcher, bus events.Consumer, logger log.Logger, cfg *confi
|
||||
case events.FileUploaded:
|
||||
indexSpaceDebouncer.Debounce(getSpaceID(ev.Ref))
|
||||
case events.UploadReady:
|
||||
if ev.Failed {
|
||||
return
|
||||
}
|
||||
indexSpaceDebouncer.Debounce(getSpaceID(ev.FileRef))
|
||||
case events.SpaceRenamed:
|
||||
indexSpaceDebouncer.Debounce(ev.ID)
|
||||
|
||||
Reference in new issue
Block a user