Skip to content

Commit 0238b82

Browse files
Treat is_sorted as a property
1 parent 95b6490 commit 0238b82

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tap_postgres/client.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ def _increment_stream_state(
379379
f"stream(replication method={self.replication_method})"
380380
)
381381
raise ValueError(msg)
382-
treat_as_sorted = self.is_sorted()
382+
treat_as_sorted = self.is_sorted
383383
if not treat_as_sorted and self.state_partitioning_keys is not None:
384384
# Streams with custom state partitioning are not resumable.
385385
treat_as_sorted = False
@@ -475,13 +475,11 @@ def consume(self, message) -> dict | None:
475475
elif message_payload["action"] in delete_actions:
476476
for column in message_payload["identity"]:
477477
row.update({column["name"]: column["value"]})
478-
row.update(
479-
{
480-
"_sdc_deleted_at": datetime.datetime.utcnow().strftime(
481-
r"%Y-%m-%dT%H:%M:%SZ"
482-
)
483-
}
484-
)
478+
row.update({
479+
"_sdc_deleted_at": datetime.datetime.utcnow().strftime(
480+
r"%Y-%m-%dT%H:%M:%SZ"
481+
)
482+
})
485483
row.update({"_sdc_lsn": message.data_start})
486484
elif message_payload["action"] in truncate_actions:
487485
self.logger.debug(

0 commit comments

Comments
 (0)