HomeClusterLabs Projects

Refactor: cts-lab: Drop dead cursor-not-found code

Description

Refactor: cts-lab: Drop dead cursor-not-found code

JournalObj.async_complete() has a block guarded by "if self.limit and
not found_cursor". But a journalctl --show-cursor ... command was run.
There will always be a cursor in the output, and we read every line from
the output. So we will find the cursor, even if a limit has been set.

The only exception might be if there's some sort of error such that
there's no stdout, only stderr. However, in that case there's no reason
to think a second journalctl command to try to get the cursor would
succeed or help.

Some of this was added by a9c45ec0. Not clear what the thought process
was. The real exit condition has been an empty LogWatcher cache, not
self._hit_limit.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Mar 18 2024, 10:06 PM
Parents
rPa61eae3da55e: Refactor: cts-lab: Drop SearchObj.cache member
Branches
Unknown
Tags
Unknown