addons14/base_import_async/models/base_import_import.py
def _extract_chunks(model_obj, fields, data, chunk_size):
        """ Split the data on record boundaries,
        in chunks of minimum chunk_size """
        fields = list(map(fix_import_export_id_paths, fields))
        row_from = 0
        for rows in model_obj._extract_records(fields, data):
            rows = rows[1]["rows"]
            if rows["to"] - row_from + 1 >= chunk_size:
                yield row_from, rows["to"]
                row_from = rows["to"] + 1
        if row_from < len(data):
            yield row_from, len(data) - 1
 Split the data on record boundaries,
        in chunks of minimum chunk_size 
Split the data on record boundaries,
in chunks of minimum chunk_size
Split the data on record boundaries in chunks of minimum chunk_size
def _extract_chunks(model_obj, fields, data, chunk_size):
        fields = list(map(fix_import_export_id_paths, fields))
        row_from = 0
        for rows in model_obj._extract_records(fields, data):
            rows = rows[1]["rows"]
            if rows["to"] - row_from + 1 >= chunk_size:
                yield row_from, rows["to"]
                row_from = rows["to"] + 1
        if row_from < len(data):
            yield row_from, len(data) - 1
def _extract_chunks ( model_obj , fields , data , chunk_size ) : fields = list ( map ( fix_import_export_id_paths , fields ) ) row_from = 0 for rows in model_obj . _extract_records ( fields , data ) : rows = rows [ 1 ] [ "rows" ] if rows [ "to" ] - row_from + 1 >= chunk_size : yield row_from , rows [ "to" ] row_from = rows [ "to" ] + 1 if row_from < len ( data ) : yield row_from , len ( data ) - 1
Split the data on record boundaries,
in chunks of minimum chunk_size
Split the data on record boundaries in chunks of minimum chunk_size
""" Split the data on record boundaries,
        in chunks of minimum chunk_size """
model_obj
fields
data
chunk_size