added setting to flush redis if you feel like doing so in dev
This commit is contained in:
parent
3ca263568e
commit
4d2c28e8b2
|
@ -2,7 +2,7 @@ require "#{Rails.root}/lib/discourse_redis"
|
|||
|
||||
$redis = DiscourseRedis.new
|
||||
|
||||
if Rails.env.development? && !ENV['DO_NOT_FLUSH_REDIS']
|
||||
if Rails.env.development? && ENV['DISCOURSE_FLUSH_REDIS']
|
||||
puts "Flushing redis (development mode)"
|
||||
$redis.flushall
|
||||
end
|
||||
|
|
|
@ -30,7 +30,7 @@ describe MessageBus::ReliablePubSub do
|
|||
|
||||
it 'gets every response from child processes' do
|
||||
pid = nil
|
||||
Redis.new(:db => 10).flushall
|
||||
Redis.new(:db => 10).flushdb
|
||||
begin
|
||||
pids = (1..10).map{spawn_child}
|
||||
responses = []
|
||||
|
|
Loading…
Reference in New Issue