func InitializeAssociationSignalService(log log.T, task func(log log.T)) {
	lock.Lock()
	defer lock.Unlock()

	go func() {
		for {
			_, more := <-instance.executeSignal
			if more {
				log.Debug("Receieved signal for executing scheduled association")
				if task != nil {
					task(log)
				}
			} else {
				log.Debug("Stopping association scheduler")
				if !instance.isStopped() {
					instance.stopSignal <- true
				}
				return
			}
		}
	}()

	go func() {
		for {
			select {
			case <-schedulerHealthTimer.C:
				ExecuteAssociation(log)
			}
		}
	}()
}
// InitializeAssociationSignalService creates goroutine to handle signals
InitializeAssociationSignalService creates goroutine to handle signals
// InitializeAssociationSignalService creates goroutine to handle signals
func InitializeAssociationSignalService(log log.T, task func(log log.T)) {
	lock.Lock()
	defer lock.Unlock()
	go func() {
		for {
			_, more := <-instance.executeSignal
			if more {
				log.Debug("Receieved signal for executing scheduled association")
				if task != nil {
					task(log)
				}
			} else {
				log.Debug("Stopping association scheduler")
				if !instance.isStopped() {
					instance.stopSignal <- true
				}
				return
			}
		}
	}()
	go func() {
		for {
			select {
			case <-schedulerHealthTimer.C:
				ExecuteAssociation(log)
			}
		}
	}()
}
func InitializeAssociationSignalService ( log log . T , task func ( log log . T ) ) { lock . Lock ( ) defer lock . Unlock ( ) go func ( ) { for { _ , more := <- instance . executeSignal if more { log . Debug ( " " ) if task != nil { task ( log ) } } else { log . Debug ( " " ) if ! instance . isStopped ( ) { instance . stopSignal <- true } return } } } ( ) go func ( ) { for { select { case <- schedulerHealthTimer . C : ExecuteAssociation ( log ) } } } ( ) }
InitializeAssociationSignalService creates goroutine to handle signals
InitializeAssociationSignalService creates goroutine to handle signals