Skip to content

Commit 4008d60

Browse files
committed
remove unused functions
1 parent 8e91e4b commit 4008d60

File tree

3 files changed

+6
-415
lines changed

3 files changed

+6
-415
lines changed

project.clj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
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"]

src/pcp/scgi.clj

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
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])
@@ -60,7 +61,7 @@
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)
@@ -69,9 +70,6 @@
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]
@@ -105,8 +103,8 @@
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)))))))

0 commit comments

Comments
 (0)