Skip to content

Commit

Permalink
use progress ts vs signpost
Browse files Browse the repository at this point in the history
  • Loading branch information
pnadolny13 committed Jan 17, 2024
1 parent 9a94368 commit 1994807
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tap_hubspot/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from singer_sdk import typing as th
from singer_sdk.pagination import BaseAPIPaginator
from singer_sdk.streams import RESTStream
from singer_sdk._singerlib.utils import strptime_to_utc

if sys.version_info >= (3, 8):
from functools import cached_property
Expand Down Expand Up @@ -169,7 +170,9 @@ def prepare_request_payload(
# Hubspot wont return more than 10k records so when we hit 10k we
# need to reset our epoch to most recent and not send the next_page_token
if int(next_page_token) + 100 >= 10000:
ts = self.get_replication_key_signpost(context)
ts = strptime_to_utc(
self.get_context_state(context).get("progress_markers").get("replication_key_value")
)
else:
body["after"] = next_page_token
# The SDK rounds up when handling datetimes sometimes so we need to subtract a second to be safe
Expand Down

0 comments on commit 1994807

Please sign in to comment.