main
Bob Mottram 2020-10-04 22:01:17 +01:00
parent a3b87d1d61
commit ff8bdaa9cf
2 changed files with 12 additions and 15 deletions

View File

@ -1069,6 +1069,7 @@ class PubServer(BaseHTTPRequestHandler):
if self.path.startswith('/icons/') or \
self.path.startswith('/avatars/') or \
self.path.startswith('/favicon.ico'):
self.path.startswith('/newswire.xml'):
return False
# token based authenticated used by the web interface

View File

@ -182,7 +182,7 @@ def runNewswireDaemon(baseDir: str, httpd):
"""Periodically updates RSS feeds
"""
# initial sleep to allow the system to start up
time.sleep(100)
time.sleep(70)
while True:
# has the session been created yet?
if not httpd.session:
@ -192,21 +192,17 @@ def runNewswireDaemon(baseDir: str, httpd):
# try to update the feeds
newNewswire = None
loaded = False
try:
newNewswire = getDictFromNewswire(httpd.session, baseDir)
loaded = True
except BaseException:
print('WARN: unable to update newswire')
pass
# try:
newNewswire = getDictFromNewswire(httpd.session, baseDir)
# except BaseException:
# print('WARN: unable to update newswire')
# time.sleep(120)
# continue
if loaded:
httpd.newswire = newNewswire
print('Newswire updated')
# wait a while before the next feeds update
time.sleep(1200)
else:
time.sleep(120)
httpd.newswire = newNewswire
print('Newswire updated')
# wait a while before the next feeds update
time.sleep(1200)
def runNewswireWatchdog(projectVersion: str, httpd) -> None: