Skip to content

Commit a5be1f7

Browse files
committed
removed unused code
1 parent a97a291 commit a5be1f7

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

app.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,6 @@ def is_retriable(self, value):
7171
result = value in RETRY_CODES
7272
return result
7373

74-
@retry(stop=stop_after_attempt(3), wait=wait_fixed(10), after=after_log(app.logger, logging.DEBUG))
75-
def __createConnection(self, idx):
76-
try:
77-
application_name = ";APP={0}-{1}".format(socket.gethostname(), idx)
78-
conn = pyodbc.connect(os.environ['SQLAZURECONNSTR_WWIF'] + application_name)
79-
except Exception as e:
80-
if isinstance(e,pyodbc.ProgrammingError) or isinstance(e,pyodbc.OperationalError):
81-
if self.is_retriable(int(e.args[0])):
82-
raise
83-
84-
return conn
85-
8674
def __getConnection(self):
8775
self.__lock.acquire()
8876
idx = self.__conn_index + 1

0 commit comments

Comments
 (0)