Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 280b7c5

Browse files
author
Sung Won Chung
committed
revert
1 parent 2281af0 commit 280b7c5

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

data_diff/databases/mysql.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, ClassVar, Dict, Type, Union
1+
from typing import Any, ClassVar, Dict, Type
22

33
import attrs
44

@@ -20,7 +20,6 @@
2020
import_helper,
2121
ConnectError,
2222
BaseDialect,
23-
ThreadLocalInterpreter,
2423
)
2524
from data_diff.databases.base import (
2625
MD5_HEXDIGITS,
@@ -149,14 +148,3 @@ def create_connection(self):
149148
elif e.errno == mysql.errorcode.ER_BAD_DB_ERROR:
150149
raise ConnectError("Database does not exist") from e
151150
raise ConnectError(*e.args) from e
152-
153-
def _query_in_worker(self, sql_code: Union[str, ThreadLocalInterpreter]):
154-
"This method runs in a worker thread"
155-
if self._init_error:
156-
raise self._init_error
157-
if not self.thread_local.conn.is_connected():
158-
try:
159-
self.thread_local.conn.ping(reconnect=True, attempts=3, delay=5)
160-
except Exception as e:
161-
raise ConnectError(*e.args) from e
162-
return self._query_conn(self.thread_local.conn, sql_code)

0 commit comments

Comments
 (0)