addressed PR review comments
MODIFY
lib/beetle/configuration.rb
lib/beetle/configuration.rb
@@ -35,10 +35,10 @@ module Beetle
# handler timeout.
attr_accessor :redis_failover_timeout
- # how long we want status keys survive after we are we have seen the second message of
+ # how long we want status keys to survive after we have seen the second message of
# a redundant message pair. Setting this to a high value (hours) will reduce the
- # likelyhood of executing handler logic, but require a lerger redis instance and cause
- # a higher database size with all associated problems. Defaults to 5 minutes.
+ # likelihood of executing handler logic, but can cause a higher redis database
+ # size with all associated problems. Defaults to 5 minutes.
attr_accessor :redis_status_key_expiry_interval
# how often heartbeat messages are exchanged between failover

MODIFY
test/beetle/message_test.rb
test/beetle/message_test.rb
@@ -136,7 +136,6 @@ module Beetle
assert !message.expired?
assert !message.redundant?
- assert !message.simple?
message.process(lambda {|*args|})
keys = @store.keys(message.msg_id)
@@ -148,7 +147,7 @@ module Beetle
end
end
- test "succesful processing of a redundant message twice should delete all keys from the database (except the staus key, which should be set to expire)" do
+ test "successful processing of a redundant message twice should delete all keys from the database (except the staus key, which should be set to expire)" do
header = header_with_params({:redundant => true})
header.expects(:ack).twice
message = Message.new("somequeue", header, 'foo', :store => @store)
@@ -163,6 +162,7 @@ module Beetle
keys = @store.keys(message.msg_id)
status_key = keys.shift
assert @store.redis.exists(status_key)
+ assert @store.redis.ttl(status_key) <= @config.redis_status_key_expiry_interval
keys.each do |key|
assert !@store.redis.exists(key)
end

addressed PR review comments