From 3a93298bbe965744ed5b79fe5fd7c3b9edb4a414 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Wed, 24 Jan 2024 17:37:21 +0100 Subject: [PATCH] extend resumepp event Signed-off-by: jkoberg --- changelog/unreleased/extend-resumepp-event.md | 7 +++++++ pkg/events/postprocessing.go | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 changelog/unreleased/extend-resumepp-event.md diff --git a/changelog/unreleased/extend-resumepp-event.md b/changelog/unreleased/extend-resumepp-event.md new file mode 100644 index 0000000000..62d861aae4 --- /dev/null +++ b/changelog/unreleased/extend-resumepp-event.md @@ -0,0 +1,7 @@ +Enhancement: Extend ResumePostprocessing event + +Instead of just sending an uploadID, one can set a postprocessing step now to restart all uploads in this step +Also adds a new postprocessing step - "finished" - which means that postprocessing is finished but the storage provider +hasn't acknowledged it yet. + +https://github.com/cs3org/reva/pull/4477 diff --git a/pkg/events/postprocessing.go b/pkg/events/postprocessing.go index cd52a6356d..69e3f14ac7 100644 --- a/pkg/events/postprocessing.go +++ b/pkg/events/postprocessing.go @@ -42,6 +42,8 @@ var ( PPStepPolicies Postprocessingstep = "policies" // PPStepDelay is the step that processing. Useful for testing or user annoyment PPStepDelay Postprocessingstep = "delay" + // PPStepFinished is the step that signals that postprocessing is finished, but storage provider hasn't acknowledged it yet + PPStepFinished Postprocessingstep = "finished" // PPOutcomeDelete means that the file and the upload should be deleted PPOutcomeDelete PostprocessingOutcome = "delete" @@ -193,6 +195,7 @@ func (UploadReady) Unmarshal(v []byte) (interface{}, error) { // ResumePostprocessing can be emitted to repair broken postprocessing type ResumePostprocessing struct { UploadID string + Step Postprocessingstep Timestamp *types.Timestamp }