strict lookups and keep header aligned

This commit is contained in:
Mike McLean 2026-04-15 10:00:18 -04:00 committed by Mike McLean
commit 965ff34c83

View file

@ -8694,7 +8694,7 @@ def handle_scheduler_logs(goptions, session, args):
try:
host_id = int(host)
except ValueError:
host_id = session.getHost(host)['id']
host_id = session.getHost(host, strict=True)['id']
hosts.append(host_id)
clauses.append(['host_id', 'IN', hosts])
if options.channel:
@ -8703,7 +8703,7 @@ def handle_scheduler_logs(goptions, session, args):
try:
chan_id = int(chan)
except ValueError:
chan_id = session.getChannel(chan)['id']
chan_id = session.getChannel(chan, strict=True)['id']
channels.append(chan_id)
clauses.append(['channel_id', 'IN', channels])
if options.arch:
@ -8716,7 +8716,7 @@ def handle_scheduler_logs(goptions, session, args):
try:
user_id = int(user)
except ValueError:
user_id = session.getUser(user)['id']
user_id = session.getUser(user, strict=True)['id']
users.append(user_id)
clauses.append(['owner', 'IN', users])
if options.from_ts:
@ -8749,7 +8749,7 @@ def handle_scheduler_logs(goptions, session, args):
for log in logs:
log['time'] = time.asctime(time.localtime(log['msg_ts']))
mask = ("%(time)s %(task_id)s %(host_name)-20s - %(msg)-30s")
mask = ("%(time)-25s %(task_id)-10s %(host_name)-20s - %(msg)-30s")
if not goptions.quiet:
h = mask % {
'task_id': 'Task',