Skip to content

Commit

Permalink
state can't be {}
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohit Chatterjee committed May 14, 2024
1 parent 1f48a4d commit 97a3ef1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(self, stream_name: str, url_base: str, pagination_limit: int, crede
self.start_time = config["start_time"]
self.offset = 0
self.last_record = None
self.state = {}
self.state = {"updated_at": "2020-01-01T00:00:00Z"}

@property
def url_base(self) -> str:
Expand All @@ -100,7 +100,7 @@ def path(

def update_state(self) -> None:
if self.latest_updated_date:
if not self.state or self.latest_updated_date > self.state["updated_at"]:
if self.latest_updated_date > self.state["updated_at"]:
self.state = {"updated_at": self.latest_updated_date}
self.latest_updated_date = None
return None
Expand Down

0 comments on commit 97a3ef1

Please sign in to comment.