func getQueue() (queue.Q, error) { queueName := "tsuru-app" qfactory, err := queue.Factory() if err != nil { return nil, err } return qfactory.Get(queueName) }
func setQueue() { var err error qfactory, err = queue.Factory() if err != nil { log.Fatalf("Failed to get the queue instance: %s", err) } _handler, err = qfactory.Handler(handle, queueName) if err != nil { log.Fatalf("Failed to create the queue handler: %s", err) } }