Skip to content
Snippets Groups Projects
Commit d3274a21 authored by Hans Moog's avatar Hans Moog
Browse files

Feat: daemon.BackgroundWorker has to be named

parent 7e0c61dd
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,7 @@ var PLUGIN = node.NewPlugin("Statusscreen TPS", func(plugin *node.Plugin) { ...@@ -36,7 +36,7 @@ var PLUGIN = node.NewPlugin("Statusscreen TPS", func(plugin *node.Plugin) {
return "TPS", strconv.FormatUint(atomic.LoadUint64(&receivedTps), 10) + " received / " + strconv.FormatUint(atomic.LoadUint64(&solidTps), 10) + " new" return "TPS", strconv.FormatUint(atomic.LoadUint64(&receivedTps), 10) + " received / " + strconv.FormatUint(atomic.LoadUint64(&solidTps), 10) + " new"
}) })
}, func(plugin *node.Plugin) { }, func(plugin *node.Plugin) {
daemon.BackgroundWorker(func() { daemon.BackgroundWorker("Statusscreen TPS Tracker", func() {
ticker := time.NewTicker(time.Second) ticker := time.NewTicker(time.Second)
for { for {
......
...@@ -100,7 +100,7 @@ func run(plugin *node.Plugin) { ...@@ -100,7 +100,7 @@ func run(plugin *node.Plugin) {
return false return false
}) })
daemon.BackgroundWorker(func() { daemon.BackgroundWorker("Statusscreen Refresher", func() {
for { for {
select { select {
case <-daemon.ShutdownSignal: case <-daemon.ShutdownSignal:
...@@ -111,7 +111,7 @@ func run(plugin *node.Plugin) { ...@@ -111,7 +111,7 @@ func run(plugin *node.Plugin) {
} }
}) })
daemon.BackgroundWorker(func() { daemon.BackgroundWorker("Statusscreen App", func() {
if err := app.SetRoot(frame, true).SetFocus(frame).Run(); err != nil { if err := app.SetRoot(frame, true).SetFocus(frame).Run(); err != nil {
panic(err) panic(err)
} }
......
...@@ -37,7 +37,7 @@ func configureSolidifier(plugin *node.Plugin) { ...@@ -37,7 +37,7 @@ func configureSolidifier(plugin *node.Plugin) {
func runSolidifier(plugin *node.Plugin) { func runSolidifier(plugin *node.Plugin) {
plugin.LogInfo("Starting Solidifier ...") plugin.LogInfo("Starting Solidifier ...")
daemon.BackgroundWorker(func() { daemon.BackgroundWorker("Tangle Solidifier", func() {
plugin.LogSuccess("Starting Solidifier ... done") plugin.LogSuccess("Starting Solidifier ... done")
workerPool.Run() workerPool.Run()
......
...@@ -33,7 +33,7 @@ func configure(plugin *node.Plugin) { ...@@ -33,7 +33,7 @@ func configure(plugin *node.Plugin) {
func run(plugin *node.Plugin) { func run(plugin *node.Plugin) {
plugin.LogInfo("Starting Web Server ...") plugin.LogInfo("Starting Web Server ...")
daemon.BackgroundWorker(func() { daemon.BackgroundWorker("WebAPI Server", func() {
plugin.LogSuccess("Starting Web Server ... done") plugin.LogSuccess("Starting Web Server ... done")
if err := Server.Start(":8080"); err != nil { if err := Server.Start(":8080"); err != nil {
......
...@@ -45,7 +45,7 @@ func run(plugin *node.Plugin) { ...@@ -45,7 +45,7 @@ func run(plugin *node.Plugin) {
plugin.LogInfo("Starting ZeroMQ Publisher (port " + strconv.Itoa(*PORT.Value) + ") ...") plugin.LogInfo("Starting ZeroMQ Publisher (port " + strconv.Itoa(*PORT.Value) + ") ...")
daemon.BackgroundWorker(func() { daemon.BackgroundWorker("ZeroMQ Publisher", func() {
if err := startPublisher(plugin); err != nil { if err := startPublisher(plugin); err != nil {
plugin.LogFailure("Stopping ZeroMQ Publisher: " + err.Error()) plugin.LogFailure("Stopping ZeroMQ Publisher: " + err.Error())
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment