lib/couch.rb
# Flushes the given hashes to CouchDB
Flushes the given hashes to CouchDB
Flushes the given hashes to CouchDB
def post_bulk_if_big_enough(db, docs)
        flush = (docs.to_json.bytesize / 1024 >= (options[:flush_size_mb]*1024) or docs.length >= options[:max_array_length])
        if flush
          post_bulk_throttled(db, docs)
          docs.clear
        end
        flush
      end
def post_bulk_if_big_enough ( db , docs ) flush = ( docs . to_json . bytesize / 1024 >= ( options [ :flush_size_mb ] * 1024 ) or docs . length >= options [ :max_array_length ] ) if flush post_bulk_throttled ( db , docs ) docs . clear end flush end
Flushes the given hashes to CouchDB
Flushes the given hashes to CouchDB
db
<not_specific>
docs
<not_specific>