return 0 and use correct get modifier func

This commit is contained in:
Brian Matheson 2019-04-16 12:48:43 +00:00
parent 43ed88fe05
commit c65b240b93
1 changed files with 3 additions and 2 deletions

View File

@ -70,8 +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, WithCountOnly())
return resp, err
resp, err := q.cli.GetPrefix(prefix, etcd.WithCountOnly())
fmt.Println("response to Len query is:", resp)
return 0, err
}
func (q *Queue) Watch(fn func(q *Queue, pair *Pair)) error {