Skip to content

Commit

Permalink
ui: fix --list-inactive to show all inactive jobs
Browse files Browse the repository at this point in the history
The default "limit=5" ended up applying to the "list inactive" call to getDbSorted()
ever since 016cafd (version 2.6.0).

Explicitly pass in limit=None to avoid this problem and continue so show all of the
inactive job entries.
  • Loading branch information
wwade committed Feb 25, 2023
1 parent 7e43abc commit ded8cf6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jobrunner/db/__init__.py
Expand Up @@ -455,7 +455,7 @@ def listActive(self, thisWs, pane, useCp, includeReminders, keysOnly=False):
includeReminders=includeReminders,
keysOnly=keysOnly)

def listInactive(self, thisWs, pane, useCp, limit=5):
def listInactive(self, thisWs, pane, useCp, limit: Optional[int] = 5):
self.listDb(
self.inactive,
limit,
Expand Down
6 changes: 5 additions & 1 deletion jobrunner/main.py
Expand Up @@ -443,7 +443,11 @@ def handleNonExecOptions(options: argparse.Namespace, jobs: JobsBase):
sprint("Saved output to", fName)
return True
elif options.list_inactive:
jobs.listInactive(options.tw, options.tp, options.since_checkpoint)
jobs.listInactive(
options.tw,
options.tp,
options.since_checkpoint,
limit=None)
return True
elif options.count:
sprint(jobs.countInactive())
Expand Down

0 comments on commit ded8cf6

Please sign in to comment.