gresrun / jesque

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

when redis has no password, #117

Closed ijaychang closed 7 years ago

ijaychang commented 7 years ago

fix the ClientImpl and WorkerImpl about the auth code

when I config the net.greghaines.jesque.Config in spring config file. and My redis server has no password. It will throw a error.Because the password is not null but it's a empty string.

`

        <constructor-arg value="6379" />
        <constructor-arg value="2000" />
        <constructor-arg value="" />
        <constructor-arg value="psq-resque" />
        <constructor-arg value="1" />
    </bean>`

so do the worker

gresrun commented 7 years ago

Thanks for the contribution! I prefer not to change the current behavior and recommend using <null/> as the value to the constructor-arg in your config XML. E.g.:

<bean id="jesqueConfig" class="net.greghaines.jesque.Config">
  <constructor-arg index="0" value="172.16.0.173" />
  <constructor-arg index="1" value="6379" />
  <constructor-arg index="2" value="2000" />
  <constructor-arg index="3"><null/></constructor-arg>
  <constructor-arg index="4" value="psq-resque" />
  <constructor-arg index="5" value="1" />
</bean>