Compare commits

...
1 Commits
3 changed files with 8 additions and 3 deletions
+2 -2
View File
@@ -215,12 +215,12 @@ func (app *App) handleAvailabilityDebounced(isAvailable bool) {
log.Println("PDQ reported unavailable - starting 10s debounce timer") 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( mail.SendEmailOnError(
app.cfg.Hotel, app.cfg.Hotel,
app.cfg.Kiosk, app.cfg.Kiosk,
title, title,
"ChipDNA PDQ unavailable for more than 5 seconds", "ChipDNA PDQ unavailable for more than 60 seconds",
) )
app.availabilityMu.Lock() app.availabilityMu.Lock()
+3 -1
View File
@@ -29,7 +29,7 @@ import (
) )
const ( const (
buildVersion = "1.2.0" buildVersion = "1.2.1"
serviceName = "hardlink" serviceName = "hardlink"
pollingFrequency = 8 * time.Second pollingFrequency = 8 * time.Second
) )
@@ -205,6 +205,7 @@ func startChipDnaClient() {
err := cmd.Wait() err := cmd.Wait()
if err != nil { if err != nil {
log.Errorf("ChipDnaClient exited unexpectedly: %v", err) log.Errorf("ChipDnaClient exited unexpectedly: %v", err)
fmt.Printf("ChipDnaClient exited unexpectedly: %v", err)
time.Sleep(2 * time.Second) time.Sleep(2 * time.Second)
cmd, err = startClient() cmd, err = startClient()
if err != nil { if err != nil {
@@ -212,6 +213,7 @@ func startChipDnaClient() {
return return
} }
log.Info("ChipDnaClient restarted successfully") log.Info("ChipDnaClient restarted successfully")
fmt.Printf("ChipDnaClient restarted successfully")
} }
} }
}() }()
+3
View File
@@ -2,6 +2,9 @@
builtVersion is a const in main.go 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 #### 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 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 added ping-pdq endpoint to check the status of the pdq terminal