From 2277bd89758ac160b128e409e6443b26adb1fc39 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 25 Dec 2021 18:44:18 +0000 Subject: [PATCH] Snake case --- daemon.py | 6 +++--- epicyon.py | 14 +++++++------- tests.py | 16 ++++++++-------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/daemon.py b/daemon.py index c3231770b..c90dded37 100644 --- a/daemon.py +++ b/daemon.py @@ -18413,7 +18413,7 @@ def runDaemon(content_license_url: str, show_node_info_version: bool, broch_mode: bool, verify_all_signatures: bool, - sendThreadsTimeoutMins: int, + send_threads_timeout_mins: int, dormantMonths: int, maxNewswirePosts: int, allowLocalNetworkAccess: bool, @@ -18840,13 +18840,13 @@ def runDaemon(content_license_url: str, httpd.thrCache.start() # number of mins after which sending posts or updates will expire - httpd.sendThreadsTimeoutMins = sendThreadsTimeoutMins + httpd.send_threads_timeout_mins = send_threads_timeout_mins print('Creating posts queue') httpd.thrPostsQueue = \ threadWithTrace(target=runPostsQueue, args=(base_dir, httpd.sendThreads, debug, - httpd.sendThreadsTimeoutMins), daemon=True) + httpd.send_threads_timeout_mins), daemon=True) if not unitTest: httpd.thrPostsWatchdog = \ threadWithTrace(target=runPostsWatchdog, diff --git a/epicyon.py b/epicyon.py index 1e475f9a0..5139f487b 100644 --- a/epicyon.py +++ b/epicyon.py @@ -186,8 +186,8 @@ parser.add_argument('--default_reply_interval_hrs', default=1000, help='How many hours after publication of a post ' + 'are replies to it permitted') -parser.add_argument('--sendThreadsTimeoutMins', - dest='sendThreadsTimeoutMins', type=int, +parser.add_argument('--send_threads_timeout_mins', + dest='send_threads_timeout_mins', type=int, default=30, help='How many minutes before a thread to send out ' + 'posts expires') @@ -3068,10 +3068,10 @@ dormantMonths = \ if dormantMonths is not None: args.dormantMonths = int(dormantMonths) -sendThreadsTimeoutMins = \ - getConfigParam(base_dir, 'sendThreadsTimeoutMins') -if sendThreadsTimeoutMins is not None: - args.sendThreadsTimeoutMins = int(sendThreadsTimeoutMins) +send_threads_timeout_mins = \ + getConfigParam(base_dir, 'send_threads_timeout_mins') +if send_threads_timeout_mins is not None: + args.send_threads_timeout_mins = int(send_threads_timeout_mins) max_like_count = \ getConfigParam(base_dir, 'max_like_count') @@ -3222,7 +3222,7 @@ if __name__ == "__main__": args.show_node_info_version, args.broch_mode, args.verify_all_signatures, - args.sendThreadsTimeoutMins, + args.send_threads_timeout_mins, args.dormantMonths, args.maxNewswirePosts, args.allowLocalNetworkAccess, diff --git a/tests.py b/tests.py index a3d6ce2c7..fa00acb41 100644 --- a/tests.py +++ b/tests.py @@ -782,7 +782,7 @@ def createServerAlice(path: str, domain: str, port: int, allowLocalNetworkAccess = True maxNewswirePosts = 20 dormantMonths = 3 - sendThreadsTimeoutMins = 30 + send_threads_timeout_mins = 30 maxFollowers = 10 verify_all_signatures = True broch_mode = False @@ -806,7 +806,7 @@ def createServerAlice(path: str, domain: str, port: int, show_node_info_version, broch_mode, verify_all_signatures, - sendThreadsTimeoutMins, + send_threads_timeout_mins, dormantMonths, maxNewswirePosts, allowLocalNetworkAccess, 2048, False, True, False, False, True, maxFollowers, @@ -924,7 +924,7 @@ def createServerBob(path: str, domain: str, port: int, allowLocalNetworkAccess = True maxNewswirePosts = 20 dormantMonths = 3 - sendThreadsTimeoutMins = 30 + send_threads_timeout_mins = 30 maxFollowers = 10 verify_all_signatures = True broch_mode = False @@ -948,7 +948,7 @@ def createServerBob(path: str, domain: str, port: int, show_node_info_version, broch_mode, verify_all_signatures, - sendThreadsTimeoutMins, + send_threads_timeout_mins, dormantMonths, maxNewswirePosts, allowLocalNetworkAccess, 2048, False, True, False, False, True, maxFollowers, @@ -993,7 +993,7 @@ def createServerEve(path: str, domain: str, port: int, federationList: [], allowLocalNetworkAccess = True maxNewswirePosts = 20 dormantMonths = 3 - sendThreadsTimeoutMins = 30 + send_threads_timeout_mins = 30 maxFollowers = 10 verify_all_signatures = True broch_mode = False @@ -1018,7 +1018,7 @@ def createServerEve(path: str, domain: str, port: int, federationList: [], show_node_info_version, broch_mode, verify_all_signatures, - sendThreadsTimeoutMins, + send_threads_timeout_mins, dormantMonths, maxNewswirePosts, allowLocalNetworkAccess, 2048, False, True, False, False, True, maxFollowers, @@ -1065,7 +1065,7 @@ def createServerGroup(path: str, domain: str, port: int, allowLocalNetworkAccess = True maxNewswirePosts = 20 dormantMonths = 3 - sendThreadsTimeoutMins = 30 + send_threads_timeout_mins = 30 maxFollowers = 10 verify_all_signatures = True broch_mode = False @@ -1090,7 +1090,7 @@ def createServerGroup(path: str, domain: str, port: int, show_node_info_version, broch_mode, verify_all_signatures, - sendThreadsTimeoutMins, + send_threads_timeout_mins, dormantMonths, maxNewswirePosts, allowLocalNetworkAccess, 2048, False, True, False, False, True, maxFollowers,