Browse Source

Merge branch 'master' into develop

version-14
Anand Doshi 9 years ago
parent
commit
3acd8b462e
2 changed files with 4 additions and 4 deletions
  1. +1
    -1
      frappe/__init__.py
  2. +3
    -3
      frappe/utils/file_lock.py

+ 1
- 1
frappe/__init__.py View File

@@ -1233,4 +1233,4 @@ def get_desk_link(doctype, name):
return '<a href="#Form/{0}/{1}" style="font-weight: bold;">{2} {1}</a>'.format(doctype, name, _(doctype))

def bold(text):
return '<b>{0}</b>'.format(text)
return '<b>{0}</b>'.format(text)

+ 3
- 3
frappe/utils/file_lock.py View File

@@ -1,5 +1,5 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
# MIT License. See license.txt

from __future__ import unicode_literals

@@ -18,10 +18,10 @@ def create_lock(name):
else:
return False

def check_lock(path):
def check_lock(path, timeout=600):
if not os.path.exists(path):
return False
if time() - os.path.getmtime(path) > 600:
if time() - os.path.getmtime(path) > timeout:
raise LockTimeoutError(path)
return True



Loading…
Cancel
Save