Block session when syncing
This commit is contained in:
parent
4a6f1a12a0
commit
e9628664be
1 changed files with 6 additions and 0 deletions
|
|
@ -10,10 +10,16 @@ import frappe
|
|||
import os, sys
|
||||
from frappe.modules.import_file import import_file_by_path
|
||||
from frappe.utils import get_path, cstr
|
||||
from frappe.modules.patch_handler import block_user
|
||||
|
||||
def sync_all(force=0, verbose=False):
|
||||
block_user(True)
|
||||
|
||||
for app in frappe.get_installed_apps():
|
||||
sync_for(app, force, verbose=verbose)
|
||||
|
||||
block_user(False)
|
||||
|
||||
frappe.clear_cache()
|
||||
|
||||
def sync_for(app_name, force=0, sync_everything = False, verbose=False):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue