fix: only process completed upload if its final
This commit is contained in:
parent
e0c6c88e75
commit
941ce27293
|
@ -360,7 +360,15 @@ func (s *StorageServiceImpl) tusWorker() {
|
|||
}
|
||||
|
||||
case info := <-s.tus.CompleteUploads:
|
||||
err := s.ScheduleTusUpload(info.Upload.ID, 0)
|
||||
if !info.Upload.IsFinal {
|
||||
continue
|
||||
}
|
||||
err := s.TusUploadCompleted(info.Upload.ID)
|
||||
if err != nil {
|
||||
s.portal.Logger().Error("Could not complete tus upload", zap.Error(err))
|
||||
continue
|
||||
}
|
||||
err = s.ScheduleTusUpload(info.Upload.ID, 0)
|
||||
if err != nil {
|
||||
s.portal.Logger().Error("Could not schedule tus upload", zap.Error(err))
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue