Skip to content

Commit

Permalink
PMM-13132 Handle OS interuptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
JiriCtvrtka committed Sep 18, 2024
1 parent c8e275f commit 8107431
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions encryption-rotation/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ import (
"log"
"os"
"os/exec"
"os/signal"
"strings"
"syscall"

"github.com/Percona-Lab/kingpin"
"github.com/pkg/errors"
Expand All @@ -33,6 +35,8 @@ import (
)

func main() {
signal.Ignore(syscall.SIGINT, syscall.SIGTERM) // to prevent any interuptions during process

sqlDB, dbName := openDB()
defer sqlDB.Close() //nolint:errcheck

Expand Down

0 comments on commit 8107431

Please sign in to comment.