bgmonitor to see if we're losing connection slots
Ted Unangst tedu@tedunangst.com
Sat, 09 May 2020 14:58:19 -0400
M
go.mod
→
go.mod
@@ -9,5 +9,5 @@ github.com/mattn/go-runewidth v0.0.6
golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 golang.org/x/net v0.0.0-20190620200207-3b0461eec859 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 )
M
go.sum
→
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= 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/webs v0.6.36 h1:Y0V6sYwruiradsyP2Y4EzQ3T+kZxrtUfuC7Bwu0GRsY= -humungus.tedunangst.com/r/webs v0.6.36/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= +humungus.tedunangst.com/r/webs v0.6.41 h1:kteIzz03ij7EujsLLbRlquSgONRzoqIm1o1Bc5ie6HU= +humungus.tedunangst.com/r/webs v0.6.41/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps=
M
web.go
→
web.go
@@ -2334,6 +2334,14 @@ }()
return c } +func bgmonitor() { + for { + time.Sleep(5 * time.Minute) + log.Printf("good morning!") + log.Printf("outstanding deliveries: %s", garage.Outstanding()) + } +} + func serve() { db := opendatabase() login.Init(db)@@ -2346,6 +2354,7 @@ go runBackendServer()
go enditall() go redeliverator() go tracker() + go bgmonitor() w100 := wait100ms() getconfig("debug", &debugMode)