From 19cfbf185bb91fa86cdc8768fe1461e274a5d613 Mon Sep 17 00:00:00 2001 From: yurii Date: Tue, 10 Mar 2026 17:45:58 +0000 Subject: [PATCH] increased waiting time befor sending email on PDQ unavailability to 60 seconds --- handlers/testhandlers.go | 4 ++-- main.go | 4 +++- release notes.md | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/handlers/testhandlers.go b/handlers/testhandlers.go index 512b7dc..7e388a6 100644 --- a/handlers/testhandlers.go +++ b/handlers/testhandlers.go @@ -215,12 +215,12 @@ func (app *App) handleAvailabilityDebounced(isAvailable bool) { log.Println("PDQ reported unavailable - starting 10s debounce timer") - timer := time.AfterFunc(5*time.Second, func() { + timer := time.AfterFunc(60*time.Second, func() { mail.SendEmailOnError( app.cfg.Hotel, app.cfg.Kiosk, title, - "ChipDNA PDQ unavailable for more than 5 seconds", + "ChipDNA PDQ unavailable for more than 60 seconds", ) app.availabilityMu.Lock() diff --git a/main.go b/main.go index 6ff4158..39e2225 100644 --- a/main.go +++ b/main.go @@ -29,7 +29,7 @@ import ( ) const ( - buildVersion = "1.2.0" + buildVersion = "1.2.1" serviceName = "hardlink" pollingFrequency = 8 * time.Second ) @@ -205,6 +205,7 @@ func startChipDnaClient() { err := cmd.Wait() if err != nil { log.Errorf("ChipDnaClient exited unexpectedly: %v", err) + fmt.Printf("ChipDnaClient exited unexpectedly: %v", err) time.Sleep(2 * time.Second) cmd, err = startClient() if err != nil { @@ -212,6 +213,7 @@ func startChipDnaClient() { return } log.Info("ChipDnaClient restarted successfully") + fmt.Printf("ChipDnaClient restarted successfully") } } }() diff --git a/release notes.md b/release notes.md index 2f6fc32..9c6cbcf 100644 --- a/release notes.md +++ b/release notes.md @@ -2,6 +2,9 @@ builtVersion is a const in main.go +#### 1.2.1 - 09 February 2026 +increased waiting time befor sending email on PDQ unavailability to 60 seconds + #### 1.2.0 - 09 February 2026 added testissuedoorcard endpoint for testing the full workflow of encoding a door card without moving the card out added ping-pdq endpoint to check the status of the pdq terminal