Skip to content

Commit

Permalink
wait for persistence on signal
Browse files Browse the repository at this point in the history
  • Loading branch information
d-led committed Jun 23, 2024
1 parent 8949148 commit cfcafc2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/mermaidlive/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/carlmjohnson/versioninfo"
"github.com/cskr/pubsub/v2"
"github.com/d-led/mermaidlive"
"github.com/d-led/percounter"
)

var transpileOnly *bool
Expand Down Expand Up @@ -51,7 +52,9 @@ func main() {
mermaidlive.GetFS(),
countdownDelay,
)
server.Run(*port)
go server.Run(*port)
percounter.GlobalEmergencyPersistence().Init()
percounter.GlobalEmergencyPersistence().PersistAndExitOnSignal()
}

func init() {
Expand Down

0 comments on commit cfcafc2

Please sign in to comment.