Skip to content

Commit

Permalink
Merge pull request #10 from hotgluexyz/fix/paginationBackoff
Browse files Browse the repository at this point in the history
Fix/pagination backoff
  • Loading branch information
hsyyid authored May 24, 2022
2 parents e3b9d1e + 1abfbab commit bbcb0ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name="tap-shopify",
version="1.4.9",
version="1.4.10",
description="Singer.io tap for extracting Shopify data",
author="Stitch",
url="http://github.com/singer-io/tap-shopify",
Expand Down
6 changes: 5 additions & 1 deletion tap_shopify/streams/inventory_levels.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ def api_call_for_inventory_levels(self, parent_object_id, bookmark):
limit = RESULTS_PER_PAGE,
location_ids=parent_object_id
)

@shopify_error_handling
def get_next_page(self, inventory_page):
return inventory_page.next_page()

def get_inventory_levels(self, parent_object, bookmark):
inventory_page = self.api_call_for_inventory_levels(parent_object, bookmark)
yield from inventory_page

while inventory_page.has_next_page():
inventory_page = inventory_page.next_page()
inventory_page = self.get_next_page(inventory_page)
yield from inventory_page

def get_objects(self):
Expand Down

0 comments on commit bbcb0ce

Please sign in to comment.