Return new batches from ImportHandler.make_batches()
				
					
				
			This commit is contained in:
		
							parent
							
								
									4107a6d34f
								
							
						
					
					
						commit
						752de8830a
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -121,6 +121,7 @@ class ImportHandler(object):
 | 
			
		|||
 | 
			
		||||
        self.setup()
 | 
			
		||||
        self.begin_transaction()
 | 
			
		||||
        batches = []
 | 
			
		||||
 | 
			
		||||
        for key in keys:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -151,6 +152,7 @@ class ImportHandler(object):
 | 
			
		|||
 | 
			
		||||
                row_table = self.make_row_table(metadata, importer, batch)
 | 
			
		||||
                self.populate_row_table(session, importer, batch, row_table)
 | 
			
		||||
                batches.append(batch)
 | 
			
		||||
 | 
			
		||||
            elif importer:
 | 
			
		||||
                log.info("batches not supported for importer: %s", key)
 | 
			
		||||
| 
						 | 
				
			
			@ -165,6 +167,7 @@ class ImportHandler(object):
 | 
			
		|||
 | 
			
		||||
        session.commit()
 | 
			
		||||
        session.close()
 | 
			
		||||
        return batches
 | 
			
		||||
 | 
			
		||||
    def make_row_table(self, metadata, importer, batch):
 | 
			
		||||
        columns = [
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue