Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
AbstractStreamStateConverter,
)
from airbyte_cdk.sources.types import Record, StreamSlice, StreamState
from airbyte_cdk.utils.datetime_helpers import AirbyteDateTime, ab_datetime_parse

logger = logging.getLogger("airbyte")

Expand Down Expand Up @@ -151,8 +152,12 @@ def close_partition(self, partition: Partition) -> None:
):
if (
self._new_global_cursor is None
or self._new_global_cursor[self.cursor_field.cursor_field_key]
< cursor.state[self.cursor_field.cursor_field_key]
or ab_datetime_parse(
self._new_global_cursor[self.cursor_field.cursor_field_key]
).to_epoch_millis()
< ab_datetime_parse(
cursor.state[self.cursor_field.cursor_field_key]
).to_epoch_millis()
):
self._new_global_cursor = copy.deepcopy(cursor.state)
if not self._use_global_cursor:
Expand Down
Loading