Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #57 from ikedam/feature/StdinShouldBlock
Browse files Browse the repository at this point in the history
stdin should block and wait for new inputs till stdin is closed.
  • Loading branch information
drewr committed May 9, 2016
2 parents 466798d + 2037aa1 commit 6015950
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/stream2es/stream/stdin.clj
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@
(make-runner [_ opts handler]
(StdinStreamRunner.
(fn []
(loop [in (io/reader *in*)]
(if-not (.ready *in*)
(handler :eof)
(do
(handler (.readLine *in*))
(recur in)))))))
(do
(doseq [line (line-seq (io/reader *in*))]
(handler line))
(handler :eof)))))
StreamStorage
(settings [_ opts]
{:index.number_of_shards 2
Expand Down

0 comments on commit 6015950

Please sign in to comment.