mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-15 19:54:03 -04:00
restart complete pp when pp cannot be found
Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
6
changelog/unreleased/restart-postprocessing.md
Normal file
6
changelog/unreleased/restart-postprocessing.md
Normal file
@@ -0,0 +1,6 @@
|
||||
Bugfix: Restart Postprocessing
|
||||
|
||||
In case the postprocessing service cannot find the specified upload when restarting postprocessing, it will now send a
|
||||
`RestartPostprocessing` event to retrigger complete postprocessing
|
||||
|
||||
https://github.com/owncloud/ocis/pull/6726
|
||||
@@ -87,6 +87,15 @@ func (pps *PostprocessingService) Run() error {
|
||||
case events.ResumePostprocessing:
|
||||
pp, err = getPP(pps.store, ev.UploadID)
|
||||
if err != nil {
|
||||
if err == store.ErrNotFound {
|
||||
if err := events.Publish(pps.pub, events.RestartPostprocessing{
|
||||
UploadID: ev.UploadID,
|
||||
Timestamp: ev.Timestamp,
|
||||
}); err != nil {
|
||||
pps.log.Error().Str("uploadID", ev.UploadID).Err(err).Msg("cannot publish RestartPostprocessing event")
|
||||
}
|
||||
continue
|
||||
}
|
||||
pps.log.Error().Str("uploadID", ev.UploadID).Err(err).Msg("cannot get upload")
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user