|
|
@ -98,10 +98,10 @@ def auto_strategy(rlog_paths: LogPaths, qlog_paths: LogPaths, interactive: bool, |
|
|
|
missing_rlogs = [rlog is None or not valid_file(rlog) for rlog in rlog_paths].count(True) |
|
|
|
missing_rlogs = [rlog is None or not valid_file(rlog) for rlog in rlog_paths].count(True) |
|
|
|
if missing_rlogs != 0: |
|
|
|
if missing_rlogs != 0: |
|
|
|
if interactive: |
|
|
|
if interactive: |
|
|
|
if input(f"{missing_rlogs} rlogs were not found, would you like to fallback to qlogs for those segments? (y/n) ").lower() != "y": |
|
|
|
if input(f"{missing_rlogs}/{len(rlog_paths)} rlogs were not found, would you like to fallback to qlogs for those segments? (y/n) ").lower() != "y": |
|
|
|
return rlog_paths |
|
|
|
return rlog_paths |
|
|
|
else: |
|
|
|
else: |
|
|
|
cloudlog.warning(f"{missing_rlogs} rlogs were not found, falling back to qlogs for those segments...") |
|
|
|
cloudlog.warning(f"{missing_rlogs}/{len(rlog_paths)} rlogs were not found, falling back to qlogs for those segments...") |
|
|
|
|
|
|
|
|
|
|
|
return [rlog if valid_file(rlog) else (qlog if valid_file(qlog) else None) |
|
|
|
return [rlog if valid_file(rlog) else (qlog if valid_file(qlog) else None) |
|
|
|
for (rlog, qlog) in zip(rlog_paths, qlog_paths, strict=True)] |
|
|
|
for (rlog, qlog) in zip(rlog_paths, qlog_paths, strict=True)] |
|
|
|