mirror of
https://github.com/owncloud/ocis
synced 2026-04-25 17:25:21 +02:00
fix(postprocessing): fix --restart flag for resume command
The `--restart` / `-r` flag checked `c.Bool("retrigger")` instead of
`c.Bool("restart")`, so it silently did nothing. Fix the flag name and
add a simple confirmation message on success.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
8
changelog/unreleased/fix-postprocessing-resume-output.md
Normal file
8
changelog/unreleased/fix-postprocessing-resume-output.md
Normal file
@@ -0,0 +1,8 @@
|
||||
Bugfix: Fix postprocessing resume command --restart flag
|
||||
|
||||
The `--restart` / `-r` flag for `ocis postprocessing resume` was broken due to a flag
|
||||
name mismatch (`retrigger` vs `restart`) and silently did nothing. This has been fixed
|
||||
and the command now prints a confirmation message on success.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/11692
|
||||
https://github.com/owncloud/ocis/pull/12002
|
||||
@@ -2,6 +2,7 @@ package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/generators"
|
||||
@@ -54,7 +55,7 @@ func RestartPostprocessing(cfg *config.Config) *cli.Command {
|
||||
|
||||
var ev events.Unmarshaller
|
||||
switch {
|
||||
case c.Bool("retrigger"):
|
||||
case c.Bool("restart"):
|
||||
ev = events.RestartPostprocessing{
|
||||
UploadID: uid,
|
||||
Timestamp: utils.TSNow(),
|
||||
@@ -67,7 +68,12 @@ func RestartPostprocessing(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
return events.Publish(context.Background(), stream, ev)
|
||||
if err := events.Publish(context.Background(), stream, ev); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Println("Postprocessing event published successfully")
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user