bgmonitor to see if we're losing connection slots
This commit is contained in:
parent
9eb40cee1c
commit
3c7d500ef9
2
go.mod
2
go.mod
|
@ -9,5 +9,5 @@ require (
|
||||||
golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4
|
golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859
|
||||||
humungus.tedunangst.com/r/go-sqlite3 v1.1.3
|
humungus.tedunangst.com/r/go-sqlite3 v1.1.3
|
||||||
humungus.tedunangst.com/r/webs v0.6.40
|
humungus.tedunangst.com/r/webs v0.6.41
|
||||||
)
|
)
|
||||||
|
|
6
go.sum
6
go.sum
|
@ -22,7 +22,5 @@ golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
humungus.tedunangst.com/r/go-sqlite3 v1.1.3 h1:G2N4wzDS0NbuvrZtQJhh4F+3X+s7BF8b9ga8k38geUI=
|
humungus.tedunangst.com/r/go-sqlite3 v1.1.3 h1:G2N4wzDS0NbuvrZtQJhh4F+3X+s7BF8b9ga8k38geUI=
|
||||||
humungus.tedunangst.com/r/go-sqlite3 v1.1.3/go.mod h1:FtEEmQM7U2Ey1TuEEOyY1BmphTZnmiEjPsNLEAkpf/M=
|
humungus.tedunangst.com/r/go-sqlite3 v1.1.3/go.mod h1:FtEEmQM7U2Ey1TuEEOyY1BmphTZnmiEjPsNLEAkpf/M=
|
||||||
humungus.tedunangst.com/r/webs v0.6.36 h1:Y0V6sYwruiradsyP2Y4EzQ3T+kZxrtUfuC7Bwu0GRsY=
|
humungus.tedunangst.com/r/webs v0.6.41 h1:kteIzz03ij7EujsLLbRlquSgONRzoqIm1o1Bc5ie6HU=
|
||||||
humungus.tedunangst.com/r/webs v0.6.36/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps=
|
humungus.tedunangst.com/r/webs v0.6.41/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps=
|
||||||
humungus.tedunangst.com/r/webs v0.6.40 h1:gYAsjGPuQwqwekKd6fZl8smoaox+BsDD1U4MA339PAc=
|
|
||||||
humungus.tedunangst.com/r/webs v0.6.40/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps=
|
|
||||||
|
|
9
web.go
9
web.go
|
@ -2334,6 +2334,14 @@ func wait100ms() chan struct{} {
|
||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func bgmonitor() {
|
||||||
|
for {
|
||||||
|
time.Sleep(5 * time.Minute)
|
||||||
|
log.Printf("good morning!")
|
||||||
|
log.Printf("outstanding deliveries: %s", garage.Outstanding())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func serve() {
|
func serve() {
|
||||||
db := opendatabase()
|
db := opendatabase()
|
||||||
login.Init(db)
|
login.Init(db)
|
||||||
|
@ -2346,6 +2354,7 @@ func serve() {
|
||||||
go enditall()
|
go enditall()
|
||||||
go redeliverator()
|
go redeliverator()
|
||||||
go tracker()
|
go tracker()
|
||||||
|
go bgmonitor()
|
||||||
w100 := wait100ms()
|
w100 := wait100ms()
|
||||||
|
|
||||||
getconfig("debug", &debugMode)
|
getconfig("debug", &debugMode)
|
||||||
|
|
Loading…
Reference in New Issue