From 30564f09ae31c2b50efb86bcc53198824793a917 Mon Sep 17 00:00:00 2001 From: postmannen Date: Tue, 13 Apr 2021 07:45:14 +0200 Subject: [PATCH] removed not used function --- process.go | 13 ------------- server.go | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/process.go b/process.go index bbc6b6b..75b7c4f 100644 --- a/process.go +++ b/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. 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 // publisher or subscriber process, where a process is a go routine // that will handle either sending or receiving messages on one diff --git a/server.go b/server.go index 83e24a2..71b50bd 100644 --- a/server.go +++ b/server.go @@ -165,7 +165,7 @@ func (p *processes) printProcessesMap() { fmt.Printf("*** Output of processes map :\n") p.mu.Lock() 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()