return 0 and use correct get modifier func
This commit is contained in:
parent
43ed88fe05
commit
c65b240b93
5
queue.go
5
queue.go
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue