Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate a possible bug in (where (tagged "foo")) #42

Closed
aphyr opened this issue Nov 8, 2012 · 4 comments
Closed

Investigate a possible bug in (where (tagged "foo")) #42

aphyr opened this issue Nov 8, 2012 · 4 comments

Comments

@aphyr
Copy link
Collaborator

aphyr commented Nov 8, 2012

https://gist.github.com/0a96223a1b1cc6680375

@jib
Copy link

jib commented Nov 8, 2012

Even when culling it down further to just this, it fails to produce output:

(tagged-any "tag" prn)

@aphyr
Copy link
Collaborator Author

aphyr commented Nov 10, 2012

This seems OK to me. Can you reproduce on master?

(logging/init :file "riemann.log")

(tcp-server)
(udp-server)
(ws-server)

(periodically-expire 10)

(let [index (default :ttl 300 (update-index (index)))]
  (streams
    index
    (where (tagged "foo")
           (partial prn "foo")
           (else
             (partial prn "not foo"))))
)
Riemann::Client.new << {service: "x", tags: ["foo", "bar"]}
"foo" #riemann.codec.Event{:host "waterhouse", :service "x", :state nil, :description nil, :metric nil, :tags ["foo"], :time 1352588335, :ttl nil}

@aphyr
Copy link
Collaborator Author

aphyr commented Nov 10, 2012

Aha! I did discover a problem with (tagged-any) and (tagged-all), though: they only work with collections of tags, not single strings. I'll fix that right away.

(tagged-any ["foo"] prn) should work, in the mean time. :)

@aphyr
Copy link
Collaborator Author

aphyr commented Nov 10, 2012

Fixed in 4d1f932. Enjoy! :)

@aphyr aphyr closed this as completed Nov 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants