modified code for redis and sidekiq