mirror of
https://github.com/postmannen/ctrl.git
synced 2025-03-15 10:57:42 +00:00
removed not used function
This commit is contained in:
parent
4fde415648
commit
30564f09ae
2 changed files with 1 additions and 14 deletions
13
process.go
13
process.go
|
@ -122,19 +122,6 @@ func newProcess(natsConn *nats.Conn, processes *processes, toRingbufferCh chan<-
|
||||||
// can have that wrapped in from when it was constructed.
|
// can have that wrapped in from when it was constructed.
|
||||||
type procFunc func(ctx context.Context) error
|
type procFunc func(ctx context.Context) error
|
||||||
|
|
||||||
// stop will stop and remove the process from the active processes
|
|
||||||
// map, and it will send a cancel signal on the ctx to stop all
|
|
||||||
// running go routines that where started via this process.
|
|
||||||
func (p process) stop() {
|
|
||||||
p.processes.mu.Lock()
|
|
||||||
_, ok := p.processes.active[p.processName]
|
|
||||||
if ok {
|
|
||||||
delete(p.processes.active, p.processName)
|
|
||||||
p.ctxCancel()
|
|
||||||
}
|
|
||||||
p.processes.mu.Unlock()
|
|
||||||
}
|
|
||||||
|
|
||||||
// The purpose of this function is to check if we should start a
|
// The purpose of this function is to check if we should start a
|
||||||
// publisher or subscriber process, where a process is a go routine
|
// publisher or subscriber process, where a process is a go routine
|
||||||
// that will handle either sending or receiving messages on one
|
// that will handle either sending or receiving messages on one
|
||||||
|
|
|
@ -165,7 +165,7 @@ func (p *processes) printProcessesMap() {
|
||||||
fmt.Printf("*** Output of processes map :\n")
|
fmt.Printf("*** Output of processes map :\n")
|
||||||
p.mu.Lock()
|
p.mu.Lock()
|
||||||
for _, v := range p.active {
|
for _, v := range p.active {
|
||||||
fmt.Printf("* proc - : %v, id: %v, name: %v, allowed from: %v\n", v.processKind, v.processID, v.subject.name(), v.allowedReceivers)
|
log.Printf("* proc - : %v, id: %v, name: %v, allowed from: %v\n", v.processKind, v.processID, v.subject.name(), v.allowedReceivers)
|
||||||
}
|
}
|
||||||
p.mu.Unlock()
|
p.mu.Unlock()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue