Procházet zdrojové kódy

[fix] number of backups

version-14
Rushabh Mehta před 8 roky
rodič
revize
e8e9aef91b
3 změnil soubory, kde provedl 18 přidání a 2 odebrání
  1. +1
    -0
      frappe/change_log/current/no_of_backups.md
  2. +15
    -0
      frappe/commands/site.py
  3. +2
    -2
      frappe/core/doctype/system_settings/system_settings.json

+ 1
- 0
frappe/change_log/current/no_of_backups.md Zobrazit soubor

@@ -0,0 +1 @@
- Restrict the number of backups to be saved in System Settings

+ 15
- 0
frappe/commands/site.py Zobrazit soubor

@@ -238,6 +238,20 @@ def reload_doc(context, module, doctype, docname):
finally: finally:
frappe.destroy() frappe.destroy()


@click.command('reload-doctype')
@click.argument('doctype')
@pass_context
def reload_doctype(context, doctype):
"Reload schema for a DocType"
for site in context.sites:
try:
frappe.init(site=site)
frappe.connect()
frappe.reload_doctype(doctype, force=context.force)
frappe.db.commit()
finally:
frappe.destroy()



@click.command('use') @click.command('use')
@click.argument('site') @click.argument('site')
@@ -455,6 +469,7 @@ commands = [
new_site, new_site,
reinstall, reinstall,
reload_doc, reload_doc,
reload_doctype,
remove_from_installed_apps, remove_from_installed_apps,
restore, restore,
run_patch, run_patch,


+ 2
- 2
frappe/core/doctype/system_settings/system_settings.json Zobrazit soubor

@@ -324,7 +324,7 @@
"collapsible": 0, "collapsible": 0,
"columns": 0, "columns": 0,
"default": "3", "default": "3",
"description": "Limit the number of backups. Older backups will be automatically deleted",
"description": "Older backups will be automatically deleted",
"fieldname": "backup_limit", "fieldname": "backup_limit",
"fieldtype": "Int", "fieldtype": "Int",
"hidden": 0, "hidden": 0,
@@ -700,7 +700,7 @@
"issingle": 1, "issingle": 1,
"istable": 0, "istable": 0,
"max_attachments": 0, "max_attachments": 0,
"modified": "2016-08-23 15:12:00.582281",
"modified": "2016-08-23 15:12:00.582283",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Core", "module": "Core",
"name": "System Settings", "name": "System Settings",


Načítá se…
Zrušit
Uložit