merge-requests/30/head
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 \ if self.path.startswith('/icons/') or \
self.path.startswith('/avatars/') or \ self.path.startswith('/avatars/') or \
self.path.startswith('/favicon.ico'): self.path.startswith('/favicon.ico'):
self.path.startswith('/newswire.xml'):
return False return False
# token based authenticated used by the web interface # token based authenticated used by the web interface

View File

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