lib/redstream/trimmer.rb in redstream-0.0.1 vs lib/redstream/trimmer.rb in redstream-0.1.0

- old
+ new

@@ -1,6 +1,5 @@ - module Redstream # The Redstream::Trimmer class is neccessary to clean up messsages after all # consumers have successfully processed and committed them. Otherwise they # would fill up redis and finally bring redis down due to out of memory # issues. The Trimmer will sleep for the specified interval in case there is @@ -77,15 +76,14 @@ @logger.debug "Trimmed #{messages.size} messages from #{@stream_name}" end end sleep(5) unless got_lock - rescue => e + rescue StandardError => e @logger.error e sleep 5 retry end end end -