Don't use threads for everything

master
Bob Mottram 2019-09-03 20:27:40 +01:00
parent a6e78fbd7b
commit 407c1e4c85
1 changed files with 6 additions and 6 deletions

View File

@ -1996,7 +1996,7 @@ class PubServer(BaseHTTPRequestHandler):
fields['replyTo'], fields['replyTo'],fields['subject'])
if messageJson:
self.postToNickname=nickname
if self._postToOutboxThread(messageJson):
if self._postToOutbox(messageJson):
populateReplies(self.server.baseDir, \
self.server.httpPrefix, \
self.server.domainFull, \
@ -2018,7 +2018,7 @@ class PubServer(BaseHTTPRequestHandler):
fields['replyTo'], fields['replyTo'],fields['subject'])
if messageJson:
self.postToNickname=nickname
if self._postToOutboxThread(messageJson):
if self._postToOutbox(messageJson):
populateReplies(self.server.baseDir, \
self.server.httpPrefix, \
self.server.domain, \
@ -2040,7 +2040,7 @@ class PubServer(BaseHTTPRequestHandler):
fields['replyTo'], fields['replyTo'],fields['subject'])
if messageJson:
self.postToNickname=nickname
if self._postToOutboxThread(messageJson):
if self._postToOutbox(messageJson):
populateReplies(self.server.baseDir, \
self.server.httpPrefix, \
self.server.domain, \
@ -2069,7 +2069,7 @@ class PubServer(BaseHTTPRequestHandler):
self.postToNickname=nickname
if self.server.debug:
print('DEBUG: new DM to '+str(messageJson['object']['to']))
if self._postToOutboxThread(messageJson):
if self._postToOutbox(messageJson):
populateReplies(self.server.baseDir, \
self.server.httpPrefix, \
self.server.domain, \
@ -2099,7 +2099,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.debug,fields['subject'])
if messageJson:
self.postToNickname=nickname
if self._postToOutboxThread(messageJson):
if self._postToOutbox(messageJson):
return 1
else:
return -1
@ -3185,7 +3185,7 @@ class PubServer(BaseHTTPRequestHandler):
# https://www.w3.org/TR/activitypub/#object-without-create
if self.outboxAuthenticated:
if self._postToOutboxThread(messageJson):
if self._postToOutbox(messageJson):
if messageJson.get('id'):
self.headers['Location']= \
messageJson['id'].replace('/activity','').replace('/undo','')