mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 03:57:02 +08:00
updates-uptimes: Add update cmd back, and other fixes for the cron job.
Signed-off-by: James Antill <james@and.org>
This commit is contained in:
@@ -333,7 +333,7 @@ def _pre_cmd__verbose(args):
|
||||
globals()['conf_host_skip_eq'] = False
|
||||
globals()['conf_info_machine_ids'] = True
|
||||
globals()['conf_short_duration'] = False
|
||||
globals()['conf_stat_4_hosts'] *= 4
|
||||
globals()['conf_stat_4_hosts'] *= (args.verbose * 2)
|
||||
|
||||
|
||||
def _wild_eq(s1, s2):
|
||||
@@ -928,6 +928,7 @@ def _cmd_history_keep(args):
|
||||
os.unlink(fn)
|
||||
|
||||
def _cmd_update(args):
|
||||
global cmd
|
||||
if cmd == "update":
|
||||
cmd = "update-flush"
|
||||
if not os.path.exists(fname):
|
||||
@@ -1658,7 +1659,8 @@ def _main():
|
||||
# history-keep command
|
||||
cmd = subparsers.add_parser("history-keep", help="remove old files")
|
||||
hlp = "number of history files to keep"
|
||||
cmd.add_argument("num", type=_cmdline_arg_positive_integer, help=hlp)
|
||||
cmd.add_argument("keep", nargs='?', default=8,
|
||||
type=_cmdline_arg_positive_integer, help=hlp)
|
||||
__defs(func=_cmd_history_keep)
|
||||
|
||||
# info command
|
||||
@@ -1700,8 +1702,9 @@ def _main():
|
||||
__defs(func=_cmd_stats)
|
||||
|
||||
# update commands
|
||||
cmd = subparsers.add_parser("history", aliases=['hist'], help="show history")
|
||||
__defs(func=_cmd_history)
|
||||
als = ['update-daily','update-daily-refresh', 'update-fast', 'update-flush']
|
||||
cmd = subparsers.add_parser("update", aliases=als, help="show history")
|
||||
__defs(func=_cmd_update)
|
||||
|
||||
# uptime/uptime-min/uptime-max commands
|
||||
cmd = subparsers.add_parser("uptime-max", help="list hosts")
|
||||
|
||||
Reference in New Issue
Block a user