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