Allow configuring timeout for WooCommerce API
at least when importing data from Woo
This commit is contained in:
parent
f650ad4802
commit
ddced3e90c
|
@ -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…
Reference in a new issue