func NewQueue(goenv *goenv.Goenv, name string) *Queue { q := &Queue{Name: name} host, port, db := goenv.GetRedis() q.redisClient = redis.NewTCPClient(host+":"+port, "", int64(db)) q.redisClient.SAdd(MasterQueueKey(), name) return q }
//TODO Test this? func NewOverseer(goenv *goenv.Goenv) *Overseer { q := &Overseer{goenv: goenv, Stats: make(map[string]*QueueStat)} host, port, db := goenv.GetRedis() q.redisClient = redis.NewTCPClient(host+":"+port, "", int64(db)) for _, queue := range q.GetAllQueues() { q.WatchQueue(queue) } return q }