lib/zold/node/async_entrance.rb in zold-0.14.30 vs lib/zold/node/async_entrance.rb in zold-0.14.31

- old
+ new

@@ -92,10 +92,12 @@ end end # Always returns an array with a single ID of the pushed wallet def push(id, body) - raise 'Queue is too long, try again later' if Dir.new(@dir).count > AsyncEntrance::MAX_QUEUE + if Dir.new(@dir).count > AsyncEntrance::MAX_QUEUE + raise "Queue is too long (#{Dir.new(@dir).count} wallets), try again later" + end @mutex.synchronize do AtomicFile.new(File.join(@dir, id.to_s)).write(body) end [id] end