Sha256: 26a0dce2bbd744ab5f856c7de3f049dcd1b98c0a74e654609e6217a55690fae1
Contents?: true
Size: 339 Bytes
Versions: 10
Compression:
Stored size: 339 Bytes
Contents
module WaitForPop # This is trying to work around race conditions in a semi-sane manner def wait_for_pop queue = ActiveRecord::SqlAnalyzer.background_processor.instance_variable_get(:@queue) 4.times do return sleep 0.1 if queue.empty? sleep 0.05 end raise "Queue failed to drain in 0.2 seconds" end end
Version data entries
10 entries across 10 versions & 1 rubygems