commit_to_storage¶
- DatabaseStorageManager.commit_to_storage(element_key, product_generator)[source]¶
This is a primary function that commit changes to the storage.
- Parameters
element_key – element key to which product product must be put.
product_generator – Primary generator that yields output that can be put into storage element. All product generators and must follow following output rules. For sequence-master and sequence-aligned generator must first yield (product_inits, product_generator_first_chunk). Where product_inits contain data such as expectedrows or min_itemsize, which are required if product processes in chunks. Following yield must be product_product_chunk. For all others, generator must first yield product_inits, None. Following yield must be product_product Note: Not all product generators are processed same way. For more details, view product documentation.
- Returns
- Return type
Last result from generator if success. Otherwise RuntimeError is raised.