pos gap fix

This commit is contained in:
2026-09-30 18:01:59 +05:30
parent ea90b95cdc
commit 97f277f424
6 changed files with 609 additions and 0 deletions

12
main.go
View File

@@ -1,12 +1,14 @@
package main
import (
"context"
"fmt"
"log"
"nearle/config"
"nearle/db"
"nearle/facade"
"nearle/messaging"
"nearle/middleware"
"nearle/models"
"nearle/repositories"
"nearle/routes"
@@ -510,6 +512,16 @@ func main() {
repositories.SetCatalogueNotifier(posMqtt)
}
// How much of the till fleet is carrying a session token, in the log every
// half hour.
//
// `POS_AUTH_REQUIRED` is off, and the only thing between here and switching
// it on is that number — nothing was recording it, so an untokened till was
// waved through in silence and the risk of flipping the flag could only be
// measured by flipping it. The same figures are on
// `GET /v1/web/pos/authadoption`, behind the session guard.
go middleware.LogPosAdoption(context.Background())
// Start server on APP_PORT (1122 locally, 1009 in production — see the
// env files). Running a second copy beside something else is a one-line
// change there rather than here.