Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
naming
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-pie authored and koszti committed Jul 11, 2019
1 parent 56fe1a6 commit 443aa63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tap_postgres/sync_strategies/logical_replication.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def sync_tables(conn_info, logical_streams, state, end_lsn):
slot = locate_replication_slot(conn_info)
last_lsn_processed = None
#When no data is received, poll every 5 seconds for 15 seconds total
keep_alive_time = 5.0
poll_interval = 5.0
poll_total_seconds = conn_info['logical_poll_total_seconds'] or 15
begin_ts = datetime.datetime.now()

Expand Down Expand Up @@ -352,7 +352,7 @@ def sync_tables(conn_info, logical_streams, state, end_lsn):

else:
now = datetime.datetime.now()
timeout = keep_alive_time - (now - cur.io_timestamp).total_seconds()
timeout = poll_interval - (now - cur.io_timestamp).total_seconds()
try:
sel = select([cur], [], [], max(0, timeout))
if not any(sel):
Expand Down

0 comments on commit 443aa63

Please sign in to comment.