cfis / activejob-locking

MIT License
30 stars 15 forks source link

Cannot pass URL connection string to SuoRedis adapter #7

Open gburgett opened 5 years ago

gburgett commented 5 years ago

Heroku gives us a Redis connection string that looks kinda like this: redis://h:xxxpasswordxxx@ec2-99-9-999-999.compute-1.amazonaws.com:6379

Unfortunately the SuoRedis adapter doesn't support passing AdapterOptions, so we can't do this:

ActiveJob::Locking.options.adapter = ActiveJob::Locking::Adapters::SuoRedis
ActiveJob::Locking.options.adapter_options = { connection: { url: ENV['REDIS_URL'] } }
bkroeker commented 5 years ago

This is the same issue I was dealing with here: https://github.com/cfis/activejob-locking/issues/3

cfis commented 5 years ago

Sorry for late response. Can you write up a patch?