comparison MoinMoin/macro/AbandonedPages.py @ 5996:524db6237b48

AbandonedPages macro: check user agent to reduce load caused by bots
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 09 Jun 2013 16:35:56 +0200
parents e5a2e21afc17
children
comparison
equal deleted inserted replaced
5995:2beb3bd18d53 5996:524db6237b48
11 """ 11 """
12 12
13 from MoinMoin.macro import RecentChanges 13 from MoinMoin.macro import RecentChanges
14 14
15 def macro_AbandonedPages(macro): 15 def macro_AbandonedPages(macro):
16 if macro.request.isSpiderAgent: # reduce bot cpu usage
17 return ''
16 return RecentChanges.macro_RecentChanges(macro, abandoned=True) 18 return RecentChanges.macro_RecentChanges(macro, abandoned=True)
17 19