|
@@ -438,41 +438,6 @@ var statLogger *logrus.Logger
|
|
var mutexObjFailCounter = &sync.Mutex{}
|
|
var mutexObjFailCounter = &sync.Mutex{}
|
|
var objFailCounter map[string]int = make(map[string]int)
|
|
var objFailCounter map[string]int = make(map[string]int)
|
|
|
|
|
|
-// var mutexHasObjEmitted = &sync.Mutex{}
|
|
|
|
-// var hasObjEmitted map[string]bool = make(map[string]bool)
|
|
|
|
-
|
|
|
|
-// func markObjEmitted(obj string) {
|
|
|
|
-// mutexHasObjEmitted.Lock()
|
|
|
|
-// hasObjEmitted[obj] = true
|
|
|
|
-// mutexHasObjEmitted.Unlock()
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
-// func unmarkObjEmitted(obj string) {
|
|
|
|
-// mutexHasObjEmitted.Lock()
|
|
|
|
-// delete(hasObjEmitted, obj)
|
|
|
|
-// mutexHasObjEmitted.Unlock()
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
-// func hasObjAlreadyEmitted(obj string) bool {
|
|
|
|
-// mutexHasObjEmitted.Lock()
|
|
|
|
-// defer mutexHasObjEmitted.Unlock()
|
|
|
|
-// value, exists := hasObjEmitted[obj]
|
|
|
|
-// return exists && value
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
-// func writeToObjChanDeduplicated(obj string, objChan chan<- string) {
|
|
|
|
-// if !hasObjAlreadyEmitted(obj) {
|
|
|
|
-// markObjEmitted(obj)
|
|
|
|
-// objChan <- obj
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
-// func readFromObjChanDeduplicated(objChan <-chan string) string {
|
|
|
|
-// obj := <-objChan
|
|
|
|
-// unmarkObjEmitted(obj)
|
|
|
|
-// return obj
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
func main() {
|
|
func main() {
|
|
var err error
|
|
var err error
|
|
|
|
|