File tree Expand file tree Collapse file tree 3 files changed +6
-415
lines changed
Expand file tree Collapse file tree 3 files changed +6
-415
lines changed Original file line number Diff line number Diff line change 2323 [io.replikativ/hasch " 0.3.7" ]
2424 [org.clojure/core.cache " 1.0.207" ]
2525 [aleph " 0.4.6" ]
26+ [com.taoensso/timbre " 5.1.2" ]
2627
2728 ; includes for hosted environemnt
2829 [selmer " 1.12.19" ]
Original file line number Diff line number Diff line change 44 [manifold.deferred :as d]
55 [manifold.stream :as s]
66 [byte-streams :as bs]
7- [aleph.flow :as flow])
7+ [aleph.flow :as flow]
8+ [taoensso.timbre :as timbre])
89 (:import [java.nio ByteBuffer]
910 [java.util.concurrent ExecutorService]
1011 [java.io ByteArrayInputStream])
6061 (let [seg (to-string (byte-array (vec (take 50 bts))))
6162 header-len (str/replace seg #":.*" " " )
6263 len (count header-len)
63- header-int (Integer/parseInt ( if-not ( str/blank? header-len) header-len " 0 " ) )
64+ header-int (Integer/parseInt header-len)
6465 body (re-find #"(\d +)" (subs seg (inc len)))
6566 body-int (Integer/parseInt (if-not (str/blank? (second body)) (second body) " 0" ))]
6667 {:drop (inc len)
6970 :end (+ len header-int 1 1 )
7071 :total (+ body-int header-int len 1 1 )}))
7172
72- (defn str+bin [string binary]
73- (str string (bs/to-string binary)))
74-
7573(defn processor [handler executor]
7674 (fn [s _]
7775 (let [null ::none ]
105103 (s/put! s msg'))))
106104 (d/catch
107105 (fn [ex]
108- (println (str " ERROR: " ex))
109- (println ex)))
106+ (s/put! s (str " ERROR: " ex))
107+ (timbre/error ex)))
110108 (d/finally
111109 (fn []
112110 (s/close! s)))))))
You can’t perform that action at this time.
0 commit comments