()
| 714 | } |
| 715 | |
| 716 | func (u *upstream) RestartContainer() error { |
| 717 | if u.sync.Options.RestartContainer { |
| 718 | u.sync.log.Info("Upstream - Restarting container") |
| 719 | |
| 720 | ctx, cancel := context.WithTimeout(u.sync.ctx, time.Minute*5) |
| 721 | defer cancel() |
| 722 | |
| 723 | _, err := u.client.RestartContainer(ctx, &remote.Empty{}) |
| 724 | if err != nil { |
| 725 | return errors.Wrap(err, "restart container") |
| 726 | } |
| 727 | } |
| 728 | |
| 729 | return nil |
| 730 | } |
| 731 | |
| 732 | func (u *upstream) ExecuteBatchCommand() error { |
| 733 | if u.sync.Options.UploadBatchCmd != "" { |
no test coverage detected