mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-28 20:13:33 +00:00
fix(pre-deploy): progress event for stopping running hooks
This commit is contained in:
@@ -28,6 +28,8 @@ type StopPreDeployOperation struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *StopPreDeployOperation) Execute(ctx context.Context, cli Client) error {
|
func (o *StopPreDeployOperation) Execute(ctx context.Context, cli Client) error {
|
||||||
|
ctx = cliprogress.WithEventID(ctx,
|
||||||
|
cliprogress.OldPreDeployHookEventID(o.Container.ServiceName(), o.Container.ID, o.MachineName))
|
||||||
if err := cli.StopContainer(ctx, o.Container.ServiceID(), o.Container.ID, container.StopOptions{}); err != nil {
|
if err := cli.StopContainer(ctx, o.Container.ServiceID(), o.Container.ID, container.StopOptions{}); err != nil {
|
||||||
if !errdefs.IsNotFound(err) {
|
if !errdefs.IsNotFound(err) {
|
||||||
return fmt.Errorf("stop pre-deploy hook container '%s': %w", o.Container.ID, err)
|
return fmt.Errorf("stop pre-deploy hook container '%s': %w", o.Container.ID, err)
|
||||||
|
|||||||
Reference in New Issue
Block a user