def check_db(repair = false)
      unless (item_counter = dynamo_get_item('item_counter')) &&
             item_counter == @item_counter
        PEROBS.log.error "@item_counter variable (#{@item_counter}) and " +
          "item_counter table entry (#{item_counter}) don't match"
      end
      item_counter = 0
      each_item { item_counter += 1 }
      unless item_counter == @item_counter
        PEROBS.log.error "Table contains #{item_counter} items but " +
          "@item_counter is #{@item_counter}"
      end
    end
def check_db(repair = false)
      unless (item_counter = dynamo_get_item('item_counter')) &&
             item_counter == @item_counter
        PEROBS.log.error "@item_counter variable (#{@item_counter}) and " +
          "item_counter table entry (#{item_counter}) don't match"
      end
      item_counter = 0
      each_item { item_counter += 1 }
      unless item_counter == @item_counter
        PEROBS.log.error "Table contains #{item_counter} items but " +
          "@item_counter is #{@item_counter}"
      end
    end
Basic consistency check.
 @param repair [TrueClass/FalseClass] True if found errors should be
        repaired.