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]}] (defn appender-fn [socket poller {:keys [ap-config output]}]
(loop [] (loop []
(zmq/poll poller 500) (zmq/poll poller 500)
(cond (cond
(zmq/check-poller poller 0 :pollout) (zmq/send-str socket output) (zmq/check-poller poller 0 :pollout) (zmq/send-str socket output)
(zmq/check-poller poller 0 :pollerr) (System/exit 1) (zmq/check-poller poller 0 :pollerr) (System/exit 1)
:else (recur)))) :else (recur))))
(defn make-zmq-appender (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 transport: a string representing transport type: tcp, ipc, inproc, pgm/epgm
address: a string containing an address to connect to. address: a string containing an address to connect to.
port: a number representing the port to connect to." port: a number representing the port to connect to."
@ -29,6 +29,6 @@
socket (make-zmq-socket context transport address port) socket (make-zmq-socket context transport address port)
poller (doto (zmq/poller context) poller (doto (zmq/poller context)
(zmq/register socket :pollout :pollerr))] (zmq/register socket :pollout :pollerr))]
(merge default-appender-opts (merge default-appender-opts
appender-opts appender-opts
{:fn (partial appender-fn socket poller)}))) {:fn (partial appender-fn socket poller)})))