Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #61 from michael-mcdonagh/parse-timestamps-in-hook
Browse files Browse the repository at this point in the history
Parse timestamps in start_fivetran_sync
  • Loading branch information
PubChimps authored Jun 21, 2022
2 parents 10239f5 + 07435bd commit b8505e2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fivetran_provider/hooks/fivetran.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,11 @@ def start_fivetran_sync(self, connector_id):
connector_details = self.get_connector(connector_id)
succeeded_at = connector_details["succeeded_at"]
failed_at = connector_details["failed_at"]
last_sync = succeeded_at if succeeded_at > failed_at else failed_at

last_sync = (
succeeded_at
if self._parse_timestamp(succeeded_at) > self._parse_timestamp(failed_at)
else failed_at
)
return last_sync

def get_last_sync(self, connector_id, xcom=""):
Expand Down

0 comments on commit b8505e2

Please sign in to comment.