Skip to content

Instantly share code, notes, and snippets.

@travis
Created November 15, 2012 12:32
Show Gist options
  • Save travis/4078425 to your computer and use it in GitHub Desktop.
Save travis/4078425 to your computer and use it in GitHub Desktop.
(defbolt active-user-bolt ["id" "user-ids" "story"] {:prepare true}
[conf context collector]
(let [redii (redis/redii)]
(bolt
(execute [{id "id" story "story" :as tuple}]
(doseq [user-id (active-users redii)]
(emit-bolt! collector [id user-id story] :anchor tuple))
(ack! collector tuple)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment