mirror of https://gitlab.com/bashrc2/epicyon
Fix warnings
parent
1aaeb2cb01
commit
15ba6c3688
|
@ -816,8 +816,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
print('Queue: Inbox queue is full')
|
print('Queue: Inbox queue is full')
|
||||||
self._503()
|
self._503()
|
||||||
self.server.POSTbusy = False
|
self.server.POSTbusy = False
|
||||||
if not restartInboxQueueInProgress:
|
if not self.server.restartInboxQueueInProgress:
|
||||||
self.server.restartInboxQueue=True
|
self.server.restartInboxQueue = True
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
# Convert the headers needed for signature verification to dict
|
# Convert the headers needed for signature verification to dict
|
||||||
|
@ -7268,8 +7268,8 @@ def runDaemon(blogsInstance: bool, mediaInstance: bool,
|
||||||
args=(baseDir, httpd, 20), daemon=True)
|
args=(baseDir, httpd, 20), daemon=True)
|
||||||
|
|
||||||
# flags used when restarting the inbox queue
|
# flags used when restarting the inbox queue
|
||||||
httpd.restartInboxQueueInProgress=False
|
httpd.restartInboxQueueInProgress = False
|
||||||
httpd.restartInboxQueue=False
|
httpd.restartInboxQueue = False
|
||||||
|
|
||||||
if not unitTest:
|
if not unitTest:
|
||||||
print('Creating inbox queue watchdog')
|
print('Creating inbox queue watchdog')
|
||||||
|
|
4
git.py
4
git.py
|
@ -14,7 +14,7 @@ def extractPatch(baseDir: str, nickname: str, domain: str,
|
||||||
"""Is the given post content a git patch?
|
"""Is the given post content a git patch?
|
||||||
"""
|
"""
|
||||||
# must have a subject line
|
# must have a subject line
|
||||||
if not subject:
|
if not subject:
|
||||||
return False
|
return False
|
||||||
if '[PATCH]' not in content:
|
if '[PATCH]' not in content:
|
||||||
return False
|
return False
|
||||||
|
@ -48,7 +48,7 @@ def extractPatch(baseDir: str, nickname: str, domain: str,
|
||||||
for line in patchLines:
|
for line in patchLines:
|
||||||
if line.startswith('Subject:'):
|
if line.startswith('Subject:'):
|
||||||
patchSubject = \
|
patchSubject = \
|
||||||
line.replace('Subject:','').replace('/','|').strip()
|
line.replace('Subject:', '').replace('/', '|').strip()
|
||||||
patchDir = \
|
patchDir = \
|
||||||
baseDir + '/accounts/' + nickname + '@' + domain + \
|
baseDir + '/accounts/' + nickname + '@' + domain + \
|
||||||
'/patches/' + projectName
|
'/patches/' + projectName
|
||||||
|
|
6
inbox.py
6
inbox.py
|
@ -2186,14 +2186,14 @@ def runInboxQueueWatchdog(projectVersion: str, httpd) -> None:
|
||||||
while True:
|
while True:
|
||||||
time.sleep(20)
|
time.sleep(20)
|
||||||
if not httpd.thrInboxQueue.isAlive() or httpd.restartInboxQueue:
|
if not httpd.thrInboxQueue.isAlive() or httpd.restartInboxQueue:
|
||||||
httpd.restartInboxQueueInProgress=True
|
httpd.restartInboxQueueInProgress = True
|
||||||
httpd.thrInboxQueue.kill()
|
httpd.thrInboxQueue.kill()
|
||||||
httpd.thrInboxQueue = inboxQueueOriginal.clone(runInboxQueue)
|
httpd.thrInboxQueue = inboxQueueOriginal.clone(runInboxQueue)
|
||||||
httpd.inboxQueue.clear()
|
httpd.inboxQueue.clear()
|
||||||
httpd.thrInboxQueue.start()
|
httpd.thrInboxQueue.start()
|
||||||
print('Restarting inbox queue...')
|
print('Restarting inbox queue...')
|
||||||
httpd.restartInboxQueueInProgress=False
|
httpd.restartInboxQueueInProgress = False
|
||||||
httpd.restartInboxQueue=False
|
httpd.restartInboxQueue = False
|
||||||
|
|
||||||
|
|
||||||
def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
|
def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
|
|
Loading…
Reference in New Issue