Ensure cron flag triggers truly silent output

This commit is contained in:
Joshua Boniface 2024-08-25 16:34:10 -04:00
parent f7926726f2
commit 8fa6bed736
1 changed files with 6 additions and 2 deletions

View File

@ -2176,7 +2176,7 @@ def cli_vm_backup_remove(domain, backup_datestring, backup_path):
is_flag=True, is_flag=True,
default=False, default=False,
show_default=True, show_default=True,
help="Run in cron mode (equivalent to '--no-wait').", help="Run in cron mode (returns immediately with no output once job is submitted).",
) )
def cli_vm_autobackup(email_report, force_full_flag, wait_flag, cron_flag): def cli_vm_autobackup(email_report, force_full_flag, wait_flag, cron_flag):
""" """
@ -2221,7 +2221,11 @@ def cli_vm_autobackup(email_report, force_full_flag, wait_flag, cron_flag):
if retcode and wait_flag: if retcode and wait_flag:
retmsg = wait_for_celery_task(CLI_CONFIG, retmsg) retmsg = wait_for_celery_task(CLI_CONFIG, retmsg)
finish(retcode, retmsg)
if cron_flag:
finish(retcode, None)
else:
finish(retcode, retmsg)
############################################################################### ###############################################################################