Prepend closing the runner so data can still be saved

This commit is contained in:
Chris Roberts 2022-06-20 12:54:39 -07:00
parent c698980afd
commit b5233bc86b

View File

@ -126,7 +126,11 @@ func New(ctx context.Context, opts ...Option) (c *Client, err error) {
},
}
c.Cleanup(func() error {
// Prepend our runner cleanup so that it
// can properly shutdown everything before
// the server is halted if we are running
// a local server
c.cleanup.Prepend(func() error {
c.logger.Info("stopping local runner",
"runner-id", c.runner.Id())