gresrun / jesque

An implementation of Resque in Java.
http://gresrun.github.io/jesque
Apache License 2.0
628 stars 131 forks source link

Reload redis scripts on reconnect #143

Closed lpfeup closed 6 years ago

lpfeup commented 6 years ago

fixes https://github.com/gresrun/jesque/issues/100

lpfeup commented 6 years ago

To test this, I basically initialized and started a WorkerImpl and then restarted the redis instance (redis implicitly flushes the script cache on restart).

Without this fix, WorkerImpl would terminate with a JedisNoScriptException while polling the queues after a redis restart. With this fix, the worker keeps running after a redis restart.

EDIT: tested with redis docker v3.2.12

ofirnk commented 6 years ago

Cool, sounds good 👏