Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source-hubspot-native: fix variable access bug #2122

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions source-hubspot-native/source_hubspot_native/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,18 +645,6 @@ async def fetch_search_objects_modified_at(
"limit": limit,
}

# Log every 10,000 returned records, since there are 200 per page.
if round % 50 == 0:
log.info(
"fetching ids for records modified at instant",
{
"object_name": object_name,
"instant": modified,
"count": len(output_items),
"remaining": result.total,
}
)

result: SearchPageResult[CustomObjectSearchResult] = SearchPageResult[CustomObjectSearchResult].model_validate_json(
await http.request(log, url, method="POST", json=input)
)
Expand All @@ -670,6 +658,18 @@ async def fetch_search_objects_modified_at(
id_cursor = r.id
output_items.add((r.properties.hs_lastmodifieddate, str(r.id)))

# Log every 10,000 returned records, since there are 200 per page.
if round % 50 == 0:
log.info(
"fetching ids for records modified at instant",
{
"object_name": object_name,
"instant": modified,
"count": len(output_items),
"remaining": result.total,
}
)

if not result.paging:
break

Expand Down
Loading