Example #1
0
func FetchFromRedis(messages chan string, RedisClient *goredis.Redis) {

	data, _ := RedisClient.RPop("Tqueue")

	if data != nil {
		fmt.Println("Data: ", string(data))

		messages <- string(data)
	}

}
Example #2
0
func fetchFromRedis(db *sql.DB, client *goredis.Redis) {

	reply, err := client.RPop("Rqueue")

	if err != nil {
		fmt.Println(err)
	}

	fmt.Println(string(reply))

	storeinDB(db, string(reply))
}
Example #3
0
func FetchFromRedis(messages chan string, RedisClient *goredis.Redis) {

	data, _ := RedisClient.RPop("Tqueue")

	if data != nil {
		//if isJSON(string(data)) {
		fmt.Println("Data: ", string(data))
		messages <- string(data)
		//} else {
		//	fmt.Println("Data not in JSON format...")
		//}
	}
}