From e47c38d06e7553e2c2526d1b3b19fc0d2eebeaf1 Mon Sep 17 00:00:00 2001 From: Noah Hilverling Date: Wed, 13 Mar 2019 11:26:46 +0100 Subject: [PATCH] Remove unused channel --- configobject/host/host.go | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/configobject/host/host.go b/configobject/host/host.go index 2a3ba24f..dd74c825 100644 --- a/configobject/host/host.go +++ b/configobject/host/host.go @@ -227,11 +227,8 @@ func SyncOperator(super *supervisor.Supervisor, chHA chan int) error { var ( chInsert chan []string - chUpdate chan []string chDelete chan []string chInsertBack chan []configobject.Row - chUpdateBack chan []configobject.Row - chDeleteBack chan []configobject.Row ) for msg := range chHA { switch msg { @@ -240,21 +237,12 @@ func SyncOperator(super *supervisor.Supervisor, chHA chan int) error { if chInsert != nil { close(chInsert) } - if chUpdate != nil { - close(chInsert) - } if chDelete != nil { - close(chInsert) + close(chDelete) } if chInsertBack != nil { close(chInsertBack) } - if chUpdateBack != nil { - close(chUpdateBack) - } - if chDeleteBack != nil { - close(chDeleteBack) - } case icingadb_ha.Notify_IsResponsible: log.Info("Host: Got responsibility") @@ -262,17 +250,10 @@ func SyncOperator(super *supervisor.Supervisor, chHA chan int) error { wgInsert.Add(len(insert)) chInsert = make(chan []string) - chUpdate = make(chan []string) chDelete = make(chan []string) - chInsertBack = make(chan []configobject.Row) - chUpdateBack = make(chan []configobject.Row) - chDeleteBack = make(chan []configobject.Row) go InsertPrepWorker(super, chInsert, chInsertBack) - //TODO: IMPLEMENT //go UpdatePrepWorker(super, chUpdate, chUpdateBack) - //TODO: IMPLEMENT //go DeletePrepWorker(super, chDelete, chDeleteBack) - go InsertExecWorker(super, chInsertBack, wgInsert) go func() {