Housekeeping: HEAD^

This commit is contained in:
Peter Taoussanis 2014-08-14 18:34:20 +07:00
parent 5797696fbf
commit f75d707208
1 changed files with 4 additions and 4 deletions

View File

@ -11,13 +11,13 @@
(defn appender-fn [socket poller {:keys [ap-config output]}]
(loop []
(zmq/poll poller 500)
(cond
(cond
(zmq/check-poller poller 0 :pollout) (zmq/send-str socket output)
(zmq/check-poller poller 0 :pollerr) (System/exit 1)
:else (recur))))
(defn make-zmq-appender
"Returns a ØMQ appender. Takes appender options and a map consisting of:
"Returns a ØMQ appender. Takes appender options and a map consisting of:
transport: a string representing transport type: tcp, ipc, inproc, pgm/epgm
address: a string containing an address to connect to.
port: a number representing the port to connect to."
@ -29,6 +29,6 @@
socket (make-zmq-socket context transport address port)
poller (doto (zmq/poller context)
(zmq/register socket :pollout :pollerr))]
(merge default-appender-opts
appender-opts
(merge default-appender-opts
appender-opts
{:fn (partial appender-fn socket poller)})))