diff options
Diffstat (limited to 'cmd/monwork/main.go')
-rw-r--r-- | cmd/monwork/main.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/monwork/main.go b/cmd/monwork/main.go index 4271213..1e8d69f 100644 --- a/cmd/monwork/main.go +++ b/cmd/monwork/main.go @@ -11,7 +11,7 @@ import ( "text/template" "time" - "github.com/lib/pq" + _ "github.com/jackc/pgx/v5/stdlib" ) var ( @@ -42,7 +42,7 @@ func main() { log.Fatalf("could not parse check interval: %s", err) } - db, err := sql.Open("postgres", config.DB) + db, err := sql.Open("pgx", config.DB) if err != nil { log.Fatalf("could not open database connection: %s", err) } @@ -167,7 +167,7 @@ func startConfigGen(db *sql.DB, checkInterval time.Duration) { time.Sleep(checkInterval) continue } - if _, err := tx.Exec(SQLRefreshActiveCheck, check_id, pq.Array(stringToShellFields(cmd.Bytes()))); err != nil { + if _, err := tx.Exec(SQLRefreshActiveCheck, check_id, stringToShellFields(cmd.Bytes())); err != nil { tx.Rollback() log.Printf("could not refresh check '%d': %s", check_id, err) continue |