Mercurial > wikked
changeset 420:596e9ca2da86
rmlists: Add `rmlists` command to invalidate cached page lists.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 23 Mar 2017 21:59:28 -0700 |
parents | f4629148e72e |
children | 6d1d8604f882 |
files | wikked/commands/manage.py |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/wikked/commands/manage.py Wed Mar 22 18:35:31 2017 -0700 +++ b/wikked/commands/manage.py Thu Mar 23 21:59:28 2017 -0700 @@ -154,3 +154,21 @@ ctx.wiki.resolve( force=ctx.args.force, parallel=ctx.args.parallel) + + +@register_command +class RemoveAllListsCommand(WikkedCommand): + def __init__(self): + super().__init__() + self.name = 'rmlists' + self.description = ( + "Deletes all the cached page lists to force re-computing them " + "all. Page lists include things like the list of all orphan " + "or wanted pages.") + + def setupParser(self, parser): + pass + + def run(self, ctx): + ctx.wiki.db.removeAllPageLists() + logger.info("All page lists removed.")