Exemple #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)
	}()
}
Exemple #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)
	}()
}