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

Commit

Permalink
Revert "AP-1207 - abort query on tap termination (#168)" (#174)
Browse files Browse the repository at this point in the history
This reverts commit 34977a3.
  • Loading branch information
jeet-parekh-wise authored Apr 20, 2022
1 parent 98b6c2a commit 14a0be5
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tap_postgres/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import psycopg2.extensions
import singer
import singer.schema
import signal

from singer import utils, metadata, get_bookmark
from singer.catalog import Catalog
Expand All @@ -22,20 +21,6 @@
dump_catalog, clear_state_on_replication_change,
is_selected_via_metadata, refresh_streams_schema, any_logical_streams)


psycopg2.extensions.set_wait_callback(psycopg2.extras.wait_select)


def handle_signal(sig=None, frame=None):
"""
signal handler for sigterms
raise sigint because that's how psycopg2 aborts running queries
"""
raise KeyboardInterrupt("RECEIVED SIGTERM. RAISING SIGINT TO ABORT POSTGRES QUERY")


signal.signal(signal.SIGTERM, handle_signal)

LOGGER = singer.get_logger('tap_postgres')

REQUIRED_CONFIG_KEYS = [
Expand Down

0 comments on commit 14a0be5

Please sign in to comment.