diff --git a/queue.go b/queue.go index ad30e53..dc548f2 100644 --- a/queue.go +++ b/queue.go @@ -70,9 +70,9 @@ func (q *Queue) Poll() ([]*Pair, error) { func (q *Queue) Len() (int, error) { prefix := fmt.Sprintf("%s/", q.prefix) - resp, err := q.cli.GetPrefix(prefix, etcd.WithCountOnly()) - fmt.Println("response to Len query is:", resp) - return 0, err + resp, err := q.cli.GetPrefix(prefix) + fmt.Println("response to Len query for " + prefix + " is:", resp) + return len(resp), err } func (q *Queue) Watch(fn func(q *Queue, pair *Pair)) error {