2014-03-18 21:52:40 +00:00
|
|
|
class Redis
|
|
|
|
def self.connect!
|
2016-04-29 15:10:30 +01:00
|
|
|
url = ENV["REDIS_URL"] || "redis://localhost:6379/#{::Rails.env.test? ? 2 : 0}"
|
2015-11-04 23:41:08 +00:00
|
|
|
opts = { url: url }
|
2014-03-18 21:52:40 +00:00
|
|
|
|
|
|
|
opts[:logger] = ::Rails.logger if ::Rails.application.config.log_redis
|
|
|
|
|
|
|
|
Redis.current = Redis.new(opts)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-11-04 23:41:08 +00:00
|
|
|
Redis.connect!
|
2018-10-30 21:44:40 +00:00
|
|
|
Redis::Semaphore.new(:job_shift_lock).delete!
|
|
|
|
Redis::Semaphore.new(:increase_release_tag_lock).delete!
|