lib/sqs_buffer/client.rb in sqs_buffer-0.2.4 vs lib/sqs_buffer/client.rb in sqs_buffer-0.3.0

- old
+ new

@@ -83,9 +83,13 @@ def last_process_time_stale? @last_process_time.value < Time.now.to_i - @max_wait_time.value end + def time_since_last_process + Time.now.to_i - @last_process_time.value + end + def process_all_messages @process_block.value.call(buffer) delete_all_messages touch_process_time rescue StandardError => e