elastic / stream2es

Stream data into ES (Wikipedia, Twitter, stdin, or other ESes)
355 stars 60 forks source link

stream2es should exit with a non-zero code on error #28

Closed mdaniel closed 10 years ago

mdaniel commented 10 years ago
$ java -jar stream2es-b313650b-standalone.jar es \
    --source http://localhost:1234/bob \
    --target https://localhost/joe ; echo RC=$?

create index https://localhost:-1/joe
https://localhost/joe connection refused
streamed 0 indexed 0 bytes xfer 0 errors null
RC=0

Having it return zero tells shell scripts that all went according to plan, which makes bailing out on error with set -e (or even an if) problematic.

Obviously the localhost:-1 is a separate bug itself.

drewr commented 10 years ago

@mdaniel Thanks for bringing this up; it's bugged me as well. quit use really needs to be cleaned up...