Let handler cache members from CORE API, for multiple importers
This commit is contained in:
parent
2ca9cd8f76
commit
788efbd114
|
@ -75,6 +75,12 @@ class FromCOREPOSToRattail(importing.ToRattailHandler):
|
|||
keys.remove('ProductMovement')
|
||||
return keys
|
||||
|
||||
def get_core_members(self, api, progress=None):
|
||||
if not hasattr(self, 'cached_core_members'):
|
||||
self.cached_core_members = get_core_members(
|
||||
self.config, api, progress=progress)
|
||||
return self.cached_core_members
|
||||
|
||||
|
||||
class FromCOREPOSAPI(importing.Importer):
|
||||
"""
|
||||
|
@ -105,7 +111,7 @@ class FromCOREPOSAPI(importing.Importer):
|
|||
default=False)
|
||||
|
||||
def get_core_members(self):
|
||||
members = get_core_members(self.config, self.api, progress=self.progress)
|
||||
members = self.handler.get_core_members(self.api, progress=self.progress)
|
||||
|
||||
# maybe ignore NEW MEMBER accounts
|
||||
if self.should_ignore_new_members():
|
||||
|
|
Loading…
Reference in a new issue