Allow configuring timeout for WooCommerce API
at least when importing data from Woo
This commit is contained in:
		
							parent
							
								
									f650ad4802
								
							
						
					
					
						commit
						ddced3e90c
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -2,7 +2,7 @@
 | 
			
		|||
################################################################################
 | 
			
		||||
#
 | 
			
		||||
#  Rattail -- Retail Software Framework
 | 
			
		||||
#  Copyright © 2010-2021 Lance Edgar
 | 
			
		||||
#  Copyright © 2010-2022 Lance Edgar
 | 
			
		||||
#
 | 
			
		||||
#  This file is part of Rattail.
 | 
			
		||||
#
 | 
			
		||||
| 
						 | 
				
			
			@ -61,6 +61,11 @@ class FromWooCommerce(importing.Importer):
 | 
			
		|||
            'consumer_secret': self.config.require('woocommerce', 'api_consumer_secret'),
 | 
			
		||||
            'version': 'wc/v3',
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        timeout = self.config.getint('woocommerce', 'api_timeout')
 | 
			
		||||
        if timeout:
 | 
			
		||||
            kwargs['timeout'] = timeout
 | 
			
		||||
 | 
			
		||||
        self.api = WooAPI(**kwargs)
 | 
			
		||||
 | 
			
		||||
    def get_woocommerce_products(self):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue