Ensure cron flag triggers truly silent output
This commit is contained in:
parent
f7926726f2
commit
8fa6bed736
|
@ -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,6 +2221,10 @@ 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)
|
||||||
|
|
||||||
|
if cron_flag:
|
||||||
|
finish(retcode, None)
|
||||||
|
else:
|
||||||
finish(retcode, retmsg)
|
finish(retcode, retmsg)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue