Snake case

main
Bob Mottram 2021-12-25 21:37:41 +00:00
parent b92450770d
commit 8a0855af4c
15 changed files with 125 additions and 125 deletions

View File

@ -183,7 +183,7 @@ def _acceptFollow(base_dir: str, domain: str, messageJson: {},
def receiveAcceptReject(session, base_dir: str,
http_prefix: str, domain: str, port: int,
sendThreads: [], postLog: [], cachedWebfingers: {},
send_threads: [], postLog: [], cachedWebfingers: {},
personCache: {}, messageJson: {}, federationList: [],
debug: bool) -> bool:
"""Receives an Accept or Reject within the POST section of HTTPServer

View File

@ -120,7 +120,7 @@ def createAnnounce(session, base_dir: str, federationList: [],
toUrl: str, ccUrl: str, http_prefix: str,
objectUrl: str, saveToFile: bool,
client_to_server: bool,
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
personCache: {}, cachedWebfingers: {},
debug: bool, project_version: str,
signingPrivateKeyPem: str) -> {}:
@ -179,7 +179,7 @@ def createAnnounce(session, base_dir: str, federationList: [],
nickname, domain, port,
announceNickname, announceDomain, announcePort, None,
http_prefix, True, client_to_server, federationList,
sendThreads, postLog, cachedWebfingers, personCache,
send_threads, postLog, cachedWebfingers, personCache,
debug, project_version, None, groupAccount,
signingPrivateKeyPem, 639633)
@ -189,7 +189,7 @@ def createAnnounce(session, base_dir: str, federationList: [],
def announcePublic(session, base_dir: str, federationList: [],
nickname: str, domain: str, port: int, http_prefix: str,
objectUrl: str, client_to_server: bool,
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
personCache: {}, cachedWebfingers: {},
debug: bool, project_version: str,
signingPrivateKeyPem: str) -> {}:
@ -203,7 +203,7 @@ def announcePublic(session, base_dir: str, federationList: [],
nickname, domain, port,
toUrl, ccUrl, http_prefix,
objectUrl, True, client_to_server,
sendThreads, postLog,
send_threads, postLog,
personCache, cachedWebfingers,
debug, project_version,
signingPrivateKeyPem)

View File

@ -252,7 +252,7 @@ def bookmark(recentPostsCache: {},
ccList: [], http_prefix: str,
objectUrl: str, actorBookmarked: str,
client_to_server: bool,
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
personCache: {}, cachedWebfingers: {},
debug: bool, project_version: str) -> {}:
"""Creates a bookmark
@ -311,7 +311,7 @@ def undoBookmark(recentPostsCache: {},
ccList: [], http_prefix: str,
objectUrl: str, actorBookmarked: str,
client_to_server: bool,
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
personCache: {}, cachedWebfingers: {},
debug: bool, project_version: str) -> {}:
"""Removes a bookmark

View File

@ -1286,7 +1286,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.recentPostsCache,
self.server.followersThreads,
self.server.federationList,
self.server.sendThreads,
self.server.send_threads,
self.server.postLog,
self.server.cachedWebfingers,
self.server.personCache,
@ -3047,7 +3047,7 @@ class PubServer(BaseHTTPRequestHandler):
followingActor,
followingPort, http_prefix,
False, self.server.federationList,
self.server.sendThreads,
self.server.send_threads,
self.server.postLog,
self.server.cachedWebfingers,
self.server.personCache, debug,
@ -7696,7 +7696,7 @@ class PubServer(BaseHTTPRequestHandler):
announceToStr,
None, http_prefix,
repeatUrl, False, False,
self.server.sendThreads,
self.server.send_threads,
self.server.postLog,
self.server.personCache,
self.server.cachedWebfingers,
@ -7910,7 +7910,7 @@ class PubServer(BaseHTTPRequestHandler):
domain, port,
followingHandle,
self.server.federationList,
self.server.sendThreads,
self.server.send_threads,
self.server.postLog,
self.server.cachedWebfingers,
self.server.personCache,
@ -8065,7 +8065,7 @@ class PubServer(BaseHTTPRequestHandler):
domain, port,
followingHandle,
self.server.federationList,
self.server.sendThreads,
self.server.send_threads,
self.server.postLog,
self.server.cachedWebfingers,
self.server.personCache,
@ -8907,7 +8907,7 @@ class PubServer(BaseHTTPRequestHandler):
ccList,
http_prefix,
bookmarkUrl, bookmarkActor, False,
self.server.sendThreads,
self.server.send_threads,
self.server.postLog,
self.server.personCache,
self.server.cachedWebfingers,
@ -9033,7 +9033,7 @@ class PubServer(BaseHTTPRequestHandler):
ccList,
http_prefix,
bookmarkUrl, undoActor, False,
self.server.sendThreads,
self.server.send_threads,
self.server.postLog,
self.server.personCache,
self.server.cachedWebfingers,
@ -18357,13 +18357,13 @@ class EpicyonServer(ThreadingHTTPServer):
return HTTPServer.handle_error(self, request, client_address)
def runPostsQueue(base_dir: str, sendThreads: [], debug: bool,
def runPostsQueue(base_dir: str, send_threads: [], debug: bool,
timeoutMins: int) -> None:
"""Manages the threads used to send posts
"""
while True:
time.sleep(1)
removeDormantThreads(base_dir, sendThreads, debug, timeoutMins)
removeDormantThreads(base_dir, send_threads, debug, timeoutMins)
def runSharesExpire(versionNumber: str, base_dir: str) -> None:
@ -18482,7 +18482,7 @@ def runDaemon(content_license_url: str,
allow_deletion: bool = False,
debug: bool = False, unit_test: bool = False,
instance_only_skills_search: bool = False,
sendThreads: [] = [],
send_threads: [] = [],
manualFollowerApproval: bool = True) -> None:
if len(domain) == 0:
domain = 'localhost'
@ -18749,7 +18749,7 @@ def runDaemon(content_license_url: str,
httpd.POSTbusy = False
httpd.receivedMessage = False
httpd.inboxQueue = []
httpd.sendThreads = sendThreads
httpd.send_threads = send_threads
httpd.postLog = []
httpd.maxQueueLength = 64
httpd.allow_deletion = allow_deletion
@ -18873,7 +18873,7 @@ def runDaemon(content_license_url: str,
print('Creating posts queue')
httpd.thrPostsQueue = \
threadWithTrace(target=runPostsQueue,
args=(base_dir, httpd.sendThreads, debug,
args=(base_dir, httpd.send_threads, debug,
httpd.send_threads_timeout_mins), daemon=True)
if not unit_test:
httpd.thrPostsWatchdog = \
@ -18921,7 +18921,7 @@ def runDaemon(content_license_url: str,
args=(httpd.recentPostsCache,
httpd.max_recent_posts,
project_version,
base_dir, http_prefix, httpd.sendThreads,
base_dir, http_prefix, httpd.send_threads,
httpd.postLog, httpd.cachedWebfingers,
httpd.personCache, httpd.inboxQueue,
domain, onion_domain, i2p_domain,

View File

@ -1182,7 +1182,7 @@ if args.approve:
print('syntax: --approve nick@domain')
sys.exit()
session = createSession(proxy_type)
sendThreads = []
send_threads = []
postLog = []
cachedWebfingers = {}
personCache = {}
@ -1196,7 +1196,7 @@ if args.approve:
args.nickname, domain, port,
args.approve,
federationList,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers, personCache,
debug, __version__,
signingPrivateKeyPem)
@ -1210,7 +1210,7 @@ if args.deny:
print('syntax: --deny nick@domain')
sys.exit()
session = createSession(proxy_type)
sendThreads = []
send_threads = []
postLog = []
cachedWebfingers = {}
personCache = {}
@ -1224,7 +1224,7 @@ if args.deny:
args.nickname, domain, port,
args.deny,
federationList,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers, personCache,
debug, __version__,
signingPrivateKeyPem)
@ -1295,7 +1295,7 @@ if args.message:
client_to_server = args.client
attachedImageDescription = args.imageDescription
city = 'London, England'
sendThreads = []
send_threads = []
postLog = []
personCache = {}
cachedWebfingers = {}

View File

@ -718,7 +718,7 @@ def followedAccountAccepts(session, base_dir: str, http_prefix: str,
port: int,
nickname: str, domain: str, fromPort: int,
personUrl: str, federationList: [],
followJson: {}, sendThreads: [], postLog: [],
followJson: {}, send_threads: [], postLog: [],
cachedWebfingers: {}, personCache: {},
debug: bool, project_version: str,
removeFollowActivity: bool,
@ -770,7 +770,7 @@ def followedAccountAccepts(session, base_dir: str, http_prefix: str,
nickname, domain, fromPort, '',
http_prefix, True, client_to_server,
federationList,
sendThreads, postLog, cachedWebfingers,
send_threads, postLog, cachedWebfingers,
personCache, debug, project_version, None,
groupAccount, signingPrivateKeyPem,
7856837)
@ -781,7 +781,7 @@ def followedAccountRejects(session, base_dir: str, http_prefix: str,
port: int,
nickname: str, domain: str, fromPort: int,
federationList: [],
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
cachedWebfingers: {}, personCache: {},
debug: bool, project_version: str,
signingPrivateKeyPem: str):
@ -838,7 +838,7 @@ def followedAccountRejects(session, base_dir: str, http_prefix: str,
nickname, domain, fromPort, '',
http_prefix, True, client_to_server,
federationList,
sendThreads, postLog, cachedWebfingers,
send_threads, postLog, cachedWebfingers,
personCache, debug, project_version, None,
groupAccount, signingPrivateKeyPem,
6393063)
@ -850,7 +850,7 @@ def sendFollowRequest(session, base_dir: str,
followedActor: str,
followPort: int, followHttpPrefix: str,
client_to_server: bool, federationList: [],
sendThreads: [], postLog: [], cachedWebfingers: {},
send_threads: [], postLog: [], cachedWebfingers: {},
personCache: {}, debug: bool,
project_version: str, signingPrivateKeyPem: str) -> {}:
"""Gets the json object for sending a follow request
@ -930,7 +930,7 @@ def sendFollowRequest(session, base_dir: str,
'https://www.w3.org/ns/activitystreams#Public',
http_prefix, True, client_to_server,
federationList,
sendThreads, postLog, cachedWebfingers, personCache,
send_threads, postLog, cachedWebfingers, personCache,
debug, project_version, None, groupAccount,
signingPrivateKeyPem, 8234389)

View File

@ -792,7 +792,7 @@ def _receiveUndoFollow(session, base_dir: str, http_prefix: str,
def _receiveUndo(session, base_dir: str, http_prefix: str,
port: int, sendThreads: [], postLog: [],
port: int, send_threads: [], postLog: [],
cachedWebfingers: {}, personCache: {},
messageJson: {}, federationList: [],
debug: bool) -> bool:
@ -939,7 +939,7 @@ def _receiveUpdateToQuestion(recentPostsCache: {}, messageJson: {},
def _receiveUpdate(recentPostsCache: {}, session, base_dir: str,
http_prefix: str, domain: str, port: int,
sendThreads: [], postLog: [], cachedWebfingers: {},
send_threads: [], postLog: [], cachedWebfingers: {},
personCache: {}, messageJson: {}, federationList: [],
nickname: str, debug: bool) -> bool:
"""Receives an Update activity within the POST section of HTTPServer
@ -993,7 +993,7 @@ def _receiveLike(recentPostsCache: {},
session, handle: str, isGroup: bool, base_dir: str,
http_prefix: str, domain: str, port: int,
onion_domain: str,
sendThreads: [], postLog: [], cachedWebfingers: {},
send_threads: [], postLog: [], cachedWebfingers: {},
personCache: {}, messageJson: {}, federationList: [],
debug: bool,
signingPrivateKeyPem: str,
@ -1115,7 +1115,7 @@ def _receiveLike(recentPostsCache: {},
def _receiveUndoLike(recentPostsCache: {},
session, handle: str, isGroup: bool, base_dir: str,
http_prefix: str, domain: str, port: int,
sendThreads: [], postLog: [], cachedWebfingers: {},
send_threads: [], postLog: [], cachedWebfingers: {},
personCache: {}, messageJson: {}, federationList: [],
debug: bool,
signingPrivateKeyPem: str,
@ -1227,7 +1227,7 @@ def _receiveReaction(recentPostsCache: {},
session, handle: str, isGroup: bool, base_dir: str,
http_prefix: str, domain: str, port: int,
onion_domain: str,
sendThreads: [], postLog: [], cachedWebfingers: {},
send_threads: [], postLog: [], cachedWebfingers: {},
personCache: {}, messageJson: {}, federationList: [],
debug: bool,
signingPrivateKeyPem: str,
@ -1374,7 +1374,7 @@ def _receiveReaction(recentPostsCache: {},
def _receiveUndoReaction(recentPostsCache: {},
session, handle: str, isGroup: bool, base_dir: str,
http_prefix: str, domain: str, port: int,
sendThreads: [], postLog: [], cachedWebfingers: {},
send_threads: [], postLog: [], cachedWebfingers: {},
personCache: {}, messageJson: {}, federationList: [],
debug: bool,
signingPrivateKeyPem: str,
@ -1501,7 +1501,7 @@ def _receiveUndoReaction(recentPostsCache: {},
def _receiveBookmark(recentPostsCache: {},
session, handle: str, isGroup: bool, base_dir: str,
http_prefix: str, domain: str, port: int,
sendThreads: [], postLog: [], cachedWebfingers: {},
send_threads: [], postLog: [], cachedWebfingers: {},
personCache: {}, messageJson: {}, federationList: [],
debug: bool, signingPrivateKeyPem: str,
max_recent_posts: int, translate: {},
@ -1611,7 +1611,7 @@ def _receiveBookmark(recentPostsCache: {},
def _receiveUndoBookmark(recentPostsCache: {},
session, handle: str, isGroup: bool, base_dir: str,
http_prefix: str, domain: str, port: int,
sendThreads: [], postLog: [], cachedWebfingers: {},
send_threads: [], postLog: [], cachedWebfingers: {},
personCache: {}, messageJson: {}, federationList: [],
debug: bool, signingPrivateKeyPem: str,
max_recent_posts: int, translate: {},
@ -1720,7 +1720,7 @@ def _receiveUndoBookmark(recentPostsCache: {},
def _receiveDelete(session, handle: str, isGroup: bool, base_dir: str,
http_prefix: str, domain: str, port: int,
sendThreads: [], postLog: [], cachedWebfingers: {},
send_threads: [], postLog: [], cachedWebfingers: {},
personCache: {}, messageJson: {}, federationList: [],
debug: bool, allow_deletion: bool,
recentPostsCache: {}) -> bool:
@ -1797,7 +1797,7 @@ def _receiveAnnounce(recentPostsCache: {},
session, handle: str, isGroup: bool, base_dir: str,
http_prefix: str,
domain: str, onion_domain: str, port: int,
sendThreads: [], postLog: [], cachedWebfingers: {},
send_threads: [], postLog: [], cachedWebfingers: {},
personCache: {}, messageJson: {}, federationList: [],
debug: bool, translate: {},
yt_replace_domain: str,
@ -2024,7 +2024,7 @@ def _receiveAnnounce(recentPostsCache: {},
def _receiveUndoAnnounce(recentPostsCache: {},
session, handle: str, isGroup: bool, base_dir: str,
http_prefix: str, domain: str, port: int,
sendThreads: [], postLog: [], cachedWebfingers: {},
send_threads: [], postLog: [], cachedWebfingers: {},
personCache: {}, messageJson: {}, federationList: [],
debug: bool) -> bool:
"""Receives an undo announce activity within the POST section of HTTPServer
@ -2608,7 +2608,7 @@ def _groupHandle(base_dir: str, handle: str) -> bool:
def _sendToGroupMembers(session, base_dir: str, handle: str, port: int,
postJsonObject: {},
http_prefix: str, federationList: [],
sendThreads: [], postLog: [], cachedWebfingers: {},
send_threads: [], postLog: [], cachedWebfingers: {},
personCache: {}, debug: bool,
systemLanguage: str,
onion_domain: str, i2p_domain: str,
@ -2661,14 +2661,14 @@ def _sendToGroupMembers(session, base_dir: str, handle: str, port: int,
nickname, domain, port,
groupActor + '/followers', cc,
http_prefix, postId, False, False,
sendThreads, postLog,
send_threads, postLog,
personCache, cachedWebfingers,
debug, __version__, signingPrivateKeyPem)
sendToFollowersThread(session, base_dir, nickname, domain,
onion_domain, i2p_domain, port,
http_prefix, federationList,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers, personCache,
announceJson, debug, __version__,
shared_items_federated_domains,
@ -2790,7 +2790,7 @@ def _updateLastSeen(base_dir: str, handle: str, actor: str) -> None:
def _bounceDM(senderPostId: str, session, http_prefix: str,
base_dir: str, nickname: str, domain: str, port: int,
sendingHandle: str, federationList: [],
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
cachedWebfingers: {}, personCache: {},
translate: {}, debug: bool,
lastBounceMessage: [], systemLanguage: str,
@ -2865,7 +2865,7 @@ def _bounceDM(senderPostId: str, session, http_prefix: str,
nickname, domain, port,
senderNickname, senderDomain, senderPort, cc,
http_prefix, False, False, federationList,
sendThreads, postLog, cachedWebfingers,
send_threads, postLog, cachedWebfingers,
personCache, debug, __version__, None, groupAccount,
signingPrivateKeyPem, 7238634)
return True
@ -2875,7 +2875,7 @@ def _isValidDM(base_dir: str, nickname: str, domain: str, port: int,
postJsonObject: {}, updateIndexList: [],
session, http_prefix: str,
federationList: [],
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
cachedWebfingers: {},
personCache: {},
translate: {}, debug: bool,
@ -2954,7 +2954,7 @@ def _isValidDM(base_dir: str, nickname: str, domain: str, port: int,
nickname, domain,
port, sendH,
federationList,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers,
personCache,
translate, debug,
@ -2976,7 +2976,7 @@ def _receiveQuestionVote(base_dir: str, nickname: str, domain: str,
postJsonObject: {}, recentPostsCache: {},
session, onion_domain: str,
i2p_domain: str, port: int,
federationList: [], sendThreads: [], postLog: [],
federationList: [], send_threads: [], postLog: [],
cachedWebfingers: {}, personCache: {},
signingPrivateKeyPem: str,
max_recent_posts: int, translate: {},
@ -3053,7 +3053,7 @@ def _receiveQuestionVote(base_dir: str, nickname: str, domain: str,
sendToFollowersThread(session, base_dir, nickname, domain,
onion_domain, i2p_domain, port,
http_prefix, federationList,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers, personCache,
postJsonObject, debug, __version__,
shared_items_federated_domains,
@ -3178,7 +3178,7 @@ def _checkForGitPatches(base_dir: str, nickname: str, domain: str,
def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
session, keyId: str, handle: str, messageJson: {},
base_dir: str, http_prefix: str, sendThreads: [],
base_dir: str, http_prefix: str, send_threads: [],
postLog: [], cachedWebfingers: {}, personCache: {},
queue: [], domain: str,
onion_domain: str, i2p_domain: str,
@ -3216,7 +3216,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
base_dir, http_prefix,
domain, port,
onion_domain,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers,
personCache,
messageJson,
@ -3238,7 +3238,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
session, handle, isGroup,
base_dir, http_prefix,
domain, port,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers,
personCache,
messageJson,
@ -3261,7 +3261,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
base_dir, http_prefix,
domain, port,
onion_domain,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers,
personCache,
messageJson,
@ -3283,7 +3283,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
session, handle, isGroup,
base_dir, http_prefix,
domain, port,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers,
personCache,
messageJson,
@ -3305,7 +3305,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
session, handle, isGroup,
base_dir, http_prefix,
domain, port,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers,
personCache,
messageJson,
@ -3327,7 +3327,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
session, handle, isGroup,
base_dir, http_prefix,
domain, port,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers,
personCache,
messageJson,
@ -3352,7 +3352,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
session, handle, isGroup,
base_dir, http_prefix,
domain, onion_domain, port,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers,
personCache,
messageJson,
@ -3374,7 +3374,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
session, handle, isGroup,
base_dir, http_prefix,
domain, port,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers,
personCache,
messageJson,
@ -3387,7 +3387,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
if _receiveDelete(session, handle, isGroup,
base_dir, http_prefix,
domain, port,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers,
personCache,
messageJson,
@ -3452,7 +3452,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
http_prefix, handle, debug,
postJsonObject, recentPostsCache,
session, onion_domain, i2p_domain, port,
federationList, sendThreads, postLog,
federationList, send_threads, postLog,
cachedWebfingers, personCache,
signingPrivateKeyPem,
max_recent_posts, translate,
@ -3475,7 +3475,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
postJsonObject, updateIndexList,
session, http_prefix,
federationList,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers,
personCache,
translate, debug,
@ -3608,7 +3608,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
if isGroup:
_sendToGroupMembers(session, base_dir, handle, port,
postJsonObject,
http_prefix, federationList, sendThreads,
http_prefix, federationList, send_threads,
postLog, cachedWebfingers, personCache,
debug, systemLanguage,
onion_domain, i2p_domain,
@ -3845,7 +3845,7 @@ def _checkJsonSignature(base_dir: str, queueJson: {}) -> (bool, bool):
def _receiveFollowRequest(session, base_dir: str, http_prefix: str,
port: int, sendThreads: [], postLog: [],
port: int, send_threads: [], postLog: [],
cachedWebfingers: {}, personCache: {},
messageJson: {}, federationList: [],
debug: bool, project_version: str,
@ -4053,7 +4053,7 @@ def _receiveFollowRequest(session, base_dir: str, http_prefix: str,
nicknameToFollow, domainToFollow, port,
nickname, domain, fromPort,
messageJson['actor'], federationList,
messageJson, sendThreads, postLog,
messageJson, send_threads, postLog,
cachedWebfingers, personCache,
debug, project_version, True,
signingPrivateKeyPem)
@ -4062,7 +4062,7 @@ def _receiveFollowRequest(session, base_dir: str, http_prefix: str,
def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
project_version: str,
base_dir: str, http_prefix: str,
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
cachedWebfingers: {}, personCache: {}, queue: [],
domain: str,
onion_domain: str, i2p_domain: str,
@ -4345,7 +4345,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
if _receiveUndo(session,
base_dir, http_prefix, port,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers,
personCache,
queueJson['post'],
@ -4366,7 +4366,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
print('DEBUG: checking for follow requests')
if _receiveFollowRequest(session,
base_dir, http_prefix, port,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers,
personCache,
queueJson['post'],
@ -4391,7 +4391,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
if receiveAcceptReject(session,
base_dir, http_prefix, domain, port,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers, personCache,
queueJson['post'],
federationList, debug):
@ -4409,7 +4409,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
if _receiveUpdate(recentPostsCache, session,
base_dir, http_prefix,
domain, port,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers,
personCache,
queueJson['post'],
@ -4491,7 +4491,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
session, keyId, handle,
queueJson['post'],
base_dir, http_prefix,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers,
personCache, queue,
domain,

View File

@ -74,7 +74,7 @@ def _like(recentPostsCache: {},
ccList: [], http_prefix: str,
objectUrl: str, actorLiked: str,
client_to_server: bool,
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
personCache: {}, cachedWebfingers: {},
debug: bool, project_version: str,
signingPrivateKeyPem: str) -> {}:
@ -136,7 +136,7 @@ def _like(recentPostsCache: {},
likedPostNickname, likedPostDomain, likedPostPort,
'https://www.w3.org/ns/activitystreams#Public',
http_prefix, True, client_to_server, federationList,
sendThreads, postLog, cachedWebfingers, personCache,
send_threads, postLog, cachedWebfingers, personCache,
debug, project_version, None, groupAccount,
signingPrivateKeyPem, 7367374)
@ -149,7 +149,7 @@ def likePost(recentPostsCache: {},
likeNickname: str, likeDomain: str, likePort: int,
ccList: [],
likeStatusNumber: int, client_to_server: bool,
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
personCache: {}, cachedWebfingers: {},
debug: bool, project_version: str,
signingPrivateKeyPem: str) -> {}:
@ -163,7 +163,7 @@ def likePost(recentPostsCache: {},
return _like(recentPostsCache,
session, base_dir, federationList, nickname, domain, port,
ccList, http_prefix, objectUrl, actorLiked, client_to_server,
sendThreads, postLog, personCache, cachedWebfingers,
send_threads, postLog, personCache, cachedWebfingers,
debug, project_version, signingPrivateKeyPem)

View File

@ -24,7 +24,7 @@ def manualDenyFollowRequest(session, base_dir: str,
nickname: str, domain: str, port: int,
denyHandle: str,
federationList: [],
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
cachedWebfingers: {}, personCache: {},
debug: bool,
project_version: str,
@ -63,7 +63,7 @@ def manualDenyFollowRequest(session, base_dir: str,
nickname, domain, port,
denyNickname, denyDomain, denyPort,
federationList,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers, personCache,
debug, project_version,
signingPrivateKeyPem)
@ -76,7 +76,7 @@ def manualDenyFollowRequestThread(session, base_dir: str,
nickname: str, domain: str, port: int,
denyHandle: str,
federationList: [],
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
cachedWebfingers: {}, personCache: {},
debug: bool,
project_version: str,
@ -91,13 +91,13 @@ def manualDenyFollowRequestThread(session, base_dir: str,
nickname, domain, port,
denyHandle,
federationList,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers, personCache,
debug,
project_version,
signingPrivateKeyPem), daemon=True)
thr.start()
sendThreads.append(thr)
send_threads.append(thr)
def _approveFollowerHandle(accountDir: str, approveHandle: str) -> None:
@ -125,7 +125,7 @@ def manualApproveFollowRequest(session, base_dir: str,
nickname: str, domain: str, port: int,
approveHandle: str,
federationList: [],
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
cachedWebfingers: {}, personCache: {},
debug: bool,
project_version: str,
@ -214,7 +214,7 @@ def manualApproveFollowRequest(session, base_dir: str,
followJson['actor'],
federationList,
followJson,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers,
personCache,
debug,
@ -282,7 +282,7 @@ def manualApproveFollowRequestThread(session, base_dir: str,
nickname: str, domain: str, port: int,
approveHandle: str,
federationList: [],
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
cachedWebfingers: {}, personCache: {},
debug: bool,
project_version: str,
@ -297,10 +297,10 @@ def manualApproveFollowRequestThread(session, base_dir: str,
nickname, domain, port,
approveHandle,
federationList,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers, personCache,
debug,
project_version,
signingPrivateKeyPem), daemon=True)
thr.start()
sendThreads.append(thr)
send_threads.append(thr)

View File

@ -379,7 +379,7 @@ def _newswireHashtagProcessing(session, base_dir: str, postJsonObject: {},
personCache: {},
cachedWebfingers: {},
federationList: [],
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
moderated: bool, url: str,
systemLanguage: str,
translate: {}) -> bool:
@ -541,7 +541,7 @@ def _convertRSStoActivityPub(base_dir: str, http_prefix: str,
session, cachedWebfingers: {},
personCache: {},
federationList: [],
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
max_mirrored_articles: int,
allow_local_network_access: bool,
systemLanguage: str,
@ -684,7 +684,7 @@ def _convertRSStoActivityPub(base_dir: str, http_prefix: str,
http_prefix, domain, port,
personCache, cachedWebfingers,
federationList,
sendThreads, postLog,
send_threads, postLog,
moderated, url, systemLanguage,
translate)
@ -831,7 +831,7 @@ def runNewswireDaemon(base_dir: str, httpd,
httpd.cachedWebfingers,
httpd.personCache,
httpd.federationList,
httpd.sendThreads,
httpd.send_threads,
httpd.postLog,
httpd.max_mirrored_articles,
httpd.allow_local_network_access,

View File

@ -183,7 +183,7 @@ def postMessageToOutbox(session, translate: {},
domain: str, domainFull: str,
onion_domain: str, i2p_domain: str, port: int,
recentPostsCache: {}, followersThreads: [],
federationList: [], sendThreads: [],
federationList: [], send_threads: [],
postLog: [], cachedWebfingers: {},
personCache: {}, allow_deletion: bool,
proxy_type: str, version: str, debug: bool,
@ -515,7 +515,7 @@ def postMessageToOutbox(session, translate: {},
domain, onion_domain, i2p_domain,
port, http_prefix,
federationList,
sendThreads,
send_threads,
postLog,
cachedWebfingers,
personCache,
@ -656,7 +656,7 @@ def postMessageToOutbox(session, translate: {},
domain, onion_domain, i2p_domain, port,
http_prefix,
federationList,
sendThreads,
send_threads,
postLog,
cachedWebfingers,
personCache,

View File

@ -2271,7 +2271,7 @@ def sendPost(signingPrivateKeyPem: str, project_version: str,
commentsEnabled: bool,
attachImageFilename: str, mediaType: str,
imageDescription: str, city: str,
federationList: [], sendThreads: [], postLog: [],
federationList: [], send_threads: [], postLog: [],
cachedWebfingers: {}, personCache: {},
isArticle: bool, systemLanguage: str,
shared_items_federated_domains: [],
@ -2395,10 +2395,10 @@ def sendPost(signingPrivateKeyPem: str, project_version: str,
print('signatureHeaderJson: ' + str(signatureHeaderJson))
# Keep the number of threads being used small
while len(sendThreads) > 1000:
while len(send_threads) > 1000:
print('WARN: Maximum threads reached - killing send thread')
sendThreads[0].kill()
sendThreads.pop(0)
send_threads[0].kill()
send_threads.pop(0)
print('WARN: thread killed')
thr = \
threadWithTrace(target=threadSendPost,
@ -2409,7 +2409,7 @@ def sendPost(signingPrivateKeyPem: str, project_version: str,
signatureHeaderJson.copy(),
postLog,
debug), daemon=True)
sendThreads.append(thr)
send_threads.append(thr)
thr.start()
return 0
@ -2612,7 +2612,7 @@ def sendSignedJson(postJsonObject: {}, session, base_dir: str,
toNickname: str, toDomain: str, toPort: int, cc: str,
http_prefix: str, saveToFile: bool, client_to_server: bool,
federationList: [],
sendThreads: [], postLog: [], cachedWebfingers: {},
send_threads: [], postLog: [], cachedWebfingers: {},
personCache: {}, debug: bool, project_version: str,
sharedItemsToken: str, groupAccount: bool,
signingPrivateKeyPem: str,
@ -2754,10 +2754,10 @@ def sendSignedJson(postJsonObject: {}, session, base_dir: str,
print('Not sending shared items federation token')
# Keep the number of threads being used small
while len(sendThreads) > 1000:
while len(send_threads) > 1000:
print('WARN: Maximum threads reached - killing send thread')
sendThreads[0].kill()
sendThreads.pop(0)
send_threads[0].kill()
send_threads.pop(0)
print('WARN: thread killed')
if debug:
@ -2772,7 +2772,7 @@ def sendSignedJson(postJsonObject: {}, session, base_dir: str,
signatureHeaderJson.copy(),
postLog,
debug), daemon=True)
sendThreads.append(thr)
send_threads.append(thr)
# thr.start()
return 0
@ -2860,7 +2860,7 @@ def _sendToNamedAddresses(session, base_dir: str,
nickname: str, domain: str,
onion_domain: str, i2p_domain: str, port: int,
http_prefix: str, federationList: [],
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
cachedWebfingers: {}, personCache: {},
postJsonObject: {}, debug: bool,
project_version: str,
@ -3001,7 +3001,7 @@ def _sendToNamedAddresses(session, base_dir: str,
toNickname, toDomain, toPort,
cc, fromHttpPrefix, True, client_to_server,
federationList,
sendThreads, postLog, cachedWebfingers,
send_threads, postLog, cachedWebfingers,
personCache, debug, project_version,
sharedItemsToken, groupAccount,
signingPrivateKeyPem, 34436782)
@ -3011,7 +3011,7 @@ def sendToNamedAddressesThread(session, base_dir: str,
nickname: str, domain: str,
onion_domain: str, i2p_domain: str, port: int,
http_prefix: str, federationList: [],
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
cachedWebfingers: {}, personCache: {},
postJsonObject: {}, debug: bool,
project_version: str,
@ -3026,7 +3026,7 @@ def sendToNamedAddressesThread(session, base_dir: str,
nickname, domain,
onion_domain, i2p_domain, port,
http_prefix, federationList,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers, personCache,
postJsonObject, debug,
project_version,
@ -3087,7 +3087,7 @@ def sendToFollowers(session, base_dir: str,
domain: str,
onion_domain: str, i2p_domain: str, port: int,
http_prefix: str, federationList: [],
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
cachedWebfingers: {}, personCache: {},
postJsonObject: {}, debug: bool,
project_version: str,
@ -3211,7 +3211,7 @@ def sendToFollowers(session, base_dir: str,
toNickname, toDomain, toPort,
cc, fromHttpPrefix, True, client_to_server,
federationList,
sendThreads, postLog, cachedWebfingers,
send_threads, postLog, cachedWebfingers,
personCache, debug, project_version,
sharedItemsToken, groupAccount,
signingPrivateKeyPem, 639342)
@ -3240,7 +3240,7 @@ def sendToFollowers(session, base_dir: str,
toNickname, toDomain, toPort,
cc, fromHttpPrefix, True, client_to_server,
federationList,
sendThreads, postLog, cachedWebfingers,
send_threads, postLog, cachedWebfingers,
personCache, debug, project_version,
sharedItemsToken, groupAccount,
signingPrivateKeyPem, 634219)
@ -3260,7 +3260,7 @@ def sendToFollowersThread(session, base_dir: str,
domain: str,
onion_domain: str, i2p_domain: str, port: int,
http_prefix: str, federationList: [],
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
cachedWebfingers: {}, personCache: {},
postJsonObject: {}, debug: bool,
project_version: str,
@ -3275,7 +3275,7 @@ def sendToFollowersThread(session, base_dir: str,
nickname, domain,
onion_domain, i2p_domain, port,
http_prefix, federationList,
sendThreads, postLog,
send_threads, postLog,
cachedWebfingers, personCache,
postJsonObject.copy(), debug,
project_version,

View File

@ -67,7 +67,7 @@ def _reaction(recentPostsCache: {},
objectUrl: str, emojiContent: str,
actorReaction: str,
client_to_server: bool,
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
personCache: {}, cachedWebfingers: {},
debug: bool, project_version: str,
signingPrivateKeyPem: str) -> {}:
@ -138,7 +138,7 @@ def _reaction(recentPostsCache: {},
reactionPostDomain, reactionPostPort,
'https://www.w3.org/ns/activitystreams#Public',
http_prefix, True, client_to_server, federationList,
sendThreads, postLog, cachedWebfingers, personCache,
send_threads, postLog, cachedWebfingers, personCache,
debug, project_version, None, groupAccount,
signingPrivateKeyPem, 7165392)
@ -152,7 +152,7 @@ def reactionPost(recentPostsCache: {},
ccList: [],
reactionStatusNumber: int, emojiContent: str,
client_to_server: bool,
sendThreads: [], postLog: [],
send_threads: [], postLog: [],
personCache: {}, cachedWebfingers: {},
debug: bool, project_version: str,
signingPrivateKeyPem: str) -> {}:
@ -169,7 +169,7 @@ def reactionPost(recentPostsCache: {},
nickname, domain, port,
ccList, http_prefix, objectUrl, emojiContent,
actorReaction, client_to_server,
sendThreads, postLog, personCache, cachedWebfingers,
send_threads, postLog, personCache, cachedWebfingers,
debug, project_version, signingPrivateKeyPem)

View File

@ -106,7 +106,7 @@ def _updatePostSchedule(base_dir: str, handle: str, httpd,
httpd.recentPostsCache,
httpd.followersThreads,
httpd.federationList,
httpd.sendThreads,
httpd.send_threads,
httpd.postLog,
httpd.cachedWebfingers,
httpd.personCache,

View File

@ -681,7 +681,7 @@ def _testThreads():
def createServerAlice(path: str, domain: str, port: int,
bobAddress: str, federationList: [],
hasFollows: bool, hasPosts: bool,
sendThreads: []):
send_threads: []):
print('Creating test server: Alice on port ' + str(port))
if os.path.isdir(path):
shutil.rmtree(path, ignore_errors=False, onerror=None)
@ -818,14 +818,14 @@ def createServerAlice(path: str, domain: str, port: int,
http_prefix, federationList, max_mentions, max_emoji, False,
proxy_type, max_replies,
domain_max_posts_per_day, account_max_posts_per_day,
allow_deletion, True, True, False, sendThreads,
allow_deletion, True, True, False, send_threads,
False)
def createServerBob(path: str, domain: str, port: int,
aliceAddress: str, federationList: [],
hasFollows: bool, hasPosts: bool,
sendThreads: []):
send_threads: []):
print('Creating test server: Bob on port ' + str(port))
if os.path.isdir(path):
shutil.rmtree(path, ignore_errors=False, onerror=None)
@ -960,13 +960,13 @@ def createServerBob(path: str, domain: str, port: int,
http_prefix, federationList, max_mentions, max_emoji, False,
proxy_type, max_replies,
domain_max_posts_per_day, account_max_posts_per_day,
allow_deletion, True, True, False, sendThreads,
allow_deletion, True, True, False, send_threads,
False)
def createServerEve(path: str, domain: str, port: int, federationList: [],
hasFollows: bool, hasPosts: bool,
sendThreads: []):
send_threads: []):
print('Creating test server: Eve on port ' + str(port))
if os.path.isdir(path):
shutil.rmtree(path, ignore_errors=False, onerror=None)
@ -1029,13 +1029,13 @@ def createServerEve(path: str, domain: str, port: int, federationList: [],
onion_domain, i2p_domain, None, None, port, port,
http_prefix, federationList, max_mentions, max_emoji, False,
proxy_type, max_replies, allow_deletion, True, True, False,
sendThreads, False)
send_threads, False)
def createServerGroup(path: str, domain: str, port: int,
federationList: [],
hasFollows: bool, hasPosts: bool,
sendThreads: []):
send_threads: []):
print('Creating test server: Group on port ' + str(port))
if os.path.isdir(path):
shutil.rmtree(path, ignore_errors=False, onerror=None)
@ -1102,7 +1102,7 @@ def createServerGroup(path: str, domain: str, port: int,
http_prefix, federationList, max_mentions, max_emoji, False,
proxy_type, max_replies,
domain_max_posts_per_day, account_max_posts_per_day,
allow_deletion, True, True, False, sendThreads,
allow_deletion, True, True, False, send_threads,
False)