fix: Added base verbosity for success/failure in backup command
This commit is contained in:
parent
1c130308e6
commit
cfe4fe5fcf
1 changed files with 4 additions and 2 deletions
|
|
@ -404,9 +404,9 @@ def backup(context, with_files=False, backup_path=None, backup_path_db=None, bac
|
|||
frappe.init(site=site)
|
||||
frappe.connect()
|
||||
odb = scheduled_backup(ignore_files=not with_files, backup_path=backup_path, backup_path_db=backup_path_db, backup_path_files=backup_path_files, backup_path_private_files=backup_path_private_files, backup_path_conf=backup_path_conf, force=True, verbose=verbose, compress=compress)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
if verbose:
|
||||
print("Backup failed for {0}. Database or site_config.json may be corrupted".format(site))
|
||||
click.echo("Backup failed for Site {0}. Database or site_config.json may be corrupted".format(site), fg="red")
|
||||
exit_code = 1
|
||||
continue
|
||||
|
||||
|
|
@ -418,6 +418,8 @@ def backup(context, with_files=False, backup_path=None, backup_path_db=None, bac
|
|||
if with_files:
|
||||
print("Public file: {0}\nPrivate file: {1}".format(odb.backup_path_files, odb.backup_path_private_files))
|
||||
|
||||
click.echo("Backup for Site {0} has been successfully completed{1}".format(site, " with files" if with_files else ""), fg="green")
|
||||
|
||||
frappe.destroy()
|
||||
if not context.sites:
|
||||
raise SiteNotSpecifiedError
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue