increased waiting time befor sending email on PDQ unavailability to 60 seconds
This commit is contained in:
parent
48e2b6f568
commit
19cfbf185b
@ -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()
|
||||||
|
|||||||
4
main.go
4
main.go
@ -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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user