mirror of https://gitlab.com/bashrc2/epicyon
Debug
parent
a3b87d1d61
commit
ff8bdaa9cf
|
@ -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
|
||||
|
|
26
newswire.py
26
newswire.py
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue