Beispiel #1
0
func attachPipeSink(pipeline rabbitbeans.Pipeline, sink chan interface{}) {
	pipeline.Dequeue(sink)
	//	pipeline.Dequeue(func(i interface{}) {
	//		if s, ok := i.(rabbitbeans.Job); !ok {
	//			rabbitbeans.LogOnError(errors.New("Cannot cast"), "Error")
	//		} else {
	//			sink <- rabbitbeans.Job(s)
	//		}
	//	})
}
Beispiel #2
0
func attachPipeSource(pipeline rabbitbeans.Pipeline, source chan interface{}) {
	log.Printf("Attaching source to pipe")
	for msg := range source {
		pipeline.Enqueue(msg)
	}
}