Without this, Work() would only return an error in strange and somewhat irrelevant scenarios (ie, can't get the os hostname, or can't get a logger). It failed to catch if there was actually an error with the poller connecting to redis. This adds error handling so that Work() will actually return an error if the poller can't connect to redis, instead of just logging it out. This allowed me to implement some smart retry logic in the app I am working on.
Did not fix tests as there is no mock for redis included and the tests seem to rely on this error not being handled properly.
Without this,
Work()
would only return an error in strange and somewhat irrelevant scenarios (ie, can't get the os hostname, or can't get a logger). It failed to catch if there was actually an error with the poller connecting to redis. This adds error handling so thatWork()
will actually return an error if the poller can't connect to redis, instead of just logging it out. This allowed me to implement some smart retry logic in the app I am working on. Did not fix tests as there is no mock for redis included and the tests seem to rely on this error not being handled properly.