morss: cache articles for 24hrs
Also make it possible to refetch articles, regardless of cachemaster
parent
5dac4c69a1
commit
7d0d416610
|
@ -243,10 +243,17 @@ def ItemFill(item, options, feedurl='/', fast=False):
|
|||
# download
|
||||
delay = -1
|
||||
|
||||
if fast:
|
||||
# super-fast mode
|
||||
if fast or options.fast:
|
||||
# force cache, don't fetch
|
||||
delay = -2
|
||||
|
||||
elif options.force:
|
||||
# force refresh
|
||||
delay = 0
|
||||
|
||||
else:
|
||||
delay = 24*60*60 # 24h
|
||||
|
||||
try:
|
||||
req = crawler.adv_get(url=link, delay=delay, timeout=TIMEOUT)
|
||||
|
||||
|
|
Loading…
Reference in New Issue