Skip to content

Commit

Permalink
Removed dead lock code
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Dec 16, 2019
1 parent ead1587 commit fe86c0d
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions data/src/entity_mysql/system.py
Expand Up @@ -437,19 +437,6 @@ def execute_query(self, query, cursor = None, retries = 3, retry_sleep = None):
if code in CONNECTION_ERRORS:
self.reconnect()

# in case the error code is related with a dead lock
# then wait a bit of time, and then retries, notice that
# the retry sleep is multiplied by three so that the next
# retry will wait more time if required
if code in DEAD_LOCK_ERRORS:
retry_sleep = retry_sleep or DEAD_LOCK_RETRY_TIME
time.sleep(retry_sleep)
is_valid = True
retry_sleep *= 3
if True: #@todo check if this is safe
cursor.close()
raise

# in case there's no transaction pending (in the middle of
# execution) tries to re-execute the query otherwise raises
# an error, indicating the issue with the query
Expand Down

0 comments on commit fe86c0d

Please sign in to comment.