increased waiting time befor sending email on PDQ unavailability to 60 seconds

This commit is contained in:
yurii 2026-03-10 17:45:58 +00:00
parent 48e2b6f568
commit 19cfbf185b
3 changed files with 8 additions and 3 deletions

View File

@ -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()

View File

@ -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")
}
}
}()

View File

@ -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