Ejemplo n.º 1
0
func WriteToRabbit(config rabbit.Config, waitGroup sync.WaitGroup, jobs <-chan interface{}) {
	rabbitConn := rabbit.Dial(config)
	queueName := "scheduler"
	go func() {
		defer waitGroup.Done()
		rabbitConn.WriteToRabbit(queueName, jobs)
	}()
}
Ejemplo n.º 2
0
func ReadFromRabbit(config rabbit.Config, waitGroup sync.WaitGroup, jobs chan<- interface{}) {
	rabbitConn := rabbit.Dial(config)
	queueName := "scheduler"
	go func() {
		defer waitGroup.Done()
		rabbitConn.ReadFromRabbit(queueName, jobs)
	}()
}