Skip to content
Snippets Groups Projects
Commit 7105524e authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Make sure critical messaging processing thead is started

parent 973f1bcb
No related branches found
No related tags found
2 merge requests!510Release,!342Preliminary memory profiling & bugfix
...@@ -246,6 +246,9 @@ func (c *client) Follow(report ClientErrorReport) (stoppable.Stoppable, error) { ...@@ -246,6 +246,9 @@ func (c *client) Follow(report ClientErrorReport) (stoppable.Stoppable, error) {
// Start the processes for the identity handler // Start the processes for the identity handler
multi.Add(c.Tracker.StartProcesses()) multi.Add(c.Tracker.StartProcesses())
//Start the critical processing thread
multi.Add(c.crit.startProcessies())
return multi, nil return multi, nil
} }
......
package cmix package cmix
import ( import (
"time"
jww "github.com/spf13/jwalterweatherman" jww "github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/client/cmix/health" "gitlab.com/elixxir/client/cmix/health"
"gitlab.com/elixxir/client/stoppable" "gitlab.com/elixxir/client/stoppable"
...@@ -10,7 +12,6 @@ import ( ...@@ -10,7 +12,6 @@ import (
"gitlab.com/elixxir/primitives/states" "gitlab.com/elixxir/primitives/states"
"gitlab.com/xx_network/primitives/id" "gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/id/ephemeral" "gitlab.com/xx_network/primitives/id/ephemeral"
"time"
) )
const criticalRawMessagesKey = "RawCriticalMessages" const criticalRawMessagesKey = "RawCriticalMessages"
...@@ -58,6 +59,12 @@ func newCritical(kv *versioned.KV, hm health.Monitor, ...@@ -58,6 +59,12 @@ func newCritical(kv *versioned.KV, hm health.Monitor,
return c return c
} }
func (c *critical) startProcessies() *stoppable.Single {
stop := stoppable.NewSingle("criticalStopper")
go c.runCriticalMessages(stop)
return stop
}
func (c *critical) runCriticalMessages(stop *stoppable.Single) { func (c *critical) runCriticalMessages(stop *stoppable.Single) {
for { for {
select { select {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment