I'm using Julia v0.4.5 and have this simple julia script to subscribe from redis channel:
using Redis
subHandler(x) = print(x)
errHandler(err) = print(err)
redisConn = RedisConnection(host="127.0.0.1", port=6379, db=0)
flushall(redisConn)
subConn = open_subscription(redisConn, errHandler)
subscribe(subConn, "julia-channel", subHandler)
If I type this script line by line in Julia repl, it works as expected.
However, if I put this code into a script file and run from shell:
julia sub.jl
Julia exits with nothing printed in a few seconds..
Maybe I should put the subscription into some kind of thread or loop (to keep julia running)?
displayon the last line). If you want the script to be interactive, you will need to add that to your script! - Daniel Arndt