Skip to content

Commit 14a0be5

Browse files
Revert "AP-1207 - abort query on tap termination (transferwise#168)" (transferwise#174)
This reverts commit 34977a3.
1 parent 98b6c2a commit 14a0be5

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

tap_postgres/__init__.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import psycopg2.extensions
77
import singer
88
import singer.schema
9-
import signal
109

1110
from singer import utils, metadata, get_bookmark
1211
from singer.catalog import Catalog
@@ -22,20 +21,6 @@
2221
dump_catalog, clear_state_on_replication_change,
2322
is_selected_via_metadata, refresh_streams_schema, any_logical_streams)
2423

25-
26-
psycopg2.extensions.set_wait_callback(psycopg2.extras.wait_select)
27-
28-
29-
def handle_signal(sig=None, frame=None):
30-
"""
31-
signal handler for sigterms
32-
raise sigint because that's how psycopg2 aborts running queries
33-
"""
34-
raise KeyboardInterrupt("RECEIVED SIGTERM. RAISING SIGINT TO ABORT POSTGRES QUERY")
35-
36-
37-
signal.signal(signal.SIGTERM, handle_signal)
38-
3924
LOGGER = singer.get_logger('tap_postgres')
4025

4126
REQUIRED_CONFIG_KEYS = [

0 commit comments

Comments
 (0)