mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
added setting to flush redis if you feel like doing so in dev
This commit is contained in:
parent
3ca263568e
commit
4d2c28e8b2
2 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@ require "#{Rails.root}/lib/discourse_redis"
|
||||||
|
|
||||||
$redis = DiscourseRedis.new
|
$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)"
|
puts "Flushing redis (development mode)"
|
||||||
$redis.flushall
|
$redis.flushall
|
||||||
end
|
end
|
||||||
|
|
|
@ -30,7 +30,7 @@ describe MessageBus::ReliablePubSub do
|
||||||
|
|
||||||
it 'gets every response from child processes' do
|
it 'gets every response from child processes' do
|
||||||
pid = nil
|
pid = nil
|
||||||
Redis.new(:db => 10).flushall
|
Redis.new(:db => 10).flushdb
|
||||||
begin
|
begin
|
||||||
pids = (1..10).map{spawn_child}
|
pids = (1..10).map{spawn_child}
|
||||||
responses = []
|
responses = []
|
||||||
|
|
Loading…
Reference in a new issue