Browse Source

Merge pull request #995 from anandpdoshi/anand-feb-5

[fix] Notification Count - Lock wait timeout exceeded
version-14
Pratik Vyas 10 years ago
parent
commit
273a80942a
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      frappe/core/doctype/notification_count/notification_count.py

+ 4
- 4
frappe/core/doctype/notification_count/notification_count.py View File

@@ -44,7 +44,7 @@ def get_notifications():
"open_count":result}).insert(ignore_permissions=True) "open_count":result}).insert(ignore_permissions=True)


except MySQLdb.OperationalError, e: except MySQLdb.OperationalError, e:
if e.args[0] != 1213:
if e.args[0] not in (1213, 1205):
raise raise


logger.error("Deadlock") logger.error("Deadlock")
@@ -60,7 +60,7 @@ def get_notifications():
"open_count":open_count_module[m]}).insert(ignore_permissions=True) "open_count":open_count_module[m]}).insert(ignore_permissions=True)


except MySQLdb.OperationalError, e: except MySQLdb.OperationalError, e:
if e.args[0] != 1213:
if e.args[0] not in (1213, 1205):
raise raise


logger.error("Deadlock") logger.error("Deadlock")
@@ -82,7 +82,7 @@ def clear_notifications(user=None):
frappe.db.sql("""delete from `tabNotification Count`""") frappe.db.sql("""delete from `tabNotification Count`""")


except MySQLdb.OperationalError, e: except MySQLdb.OperationalError, e:
if e.args[0] != 1213:
if e.args[0] not in (1213, 1205):
raise raise


logger.error("Deadlock") logger.error("Deadlock")
@@ -94,7 +94,7 @@ def delete_notification_count_for(doctype):
frappe.db.sql("""delete from `tabNotification Count` where for_doctype = %s""", (doctype,)) frappe.db.sql("""delete from `tabNotification Count` where for_doctype = %s""", (doctype,))


except MySQLdb.OperationalError, e: except MySQLdb.OperationalError, e:
if e.args[0] != 1213:
if e.args[0] not in (1213, 1205):
raise raise


logger.error("Deadlock") logger.error("Deadlock")


Loading…
Cancel
Save