mirror of https://gitlab.com/bashrc2/epicyon
Configurable maximum shared items on profile
parent
c8a2bee2ed
commit
623096d91a
|
@ -23766,7 +23766,8 @@ def load_tokens(base_dir: str, tokens_dict: {}, tokens_lookup: {}) -> None:
|
|||
break
|
||||
|
||||
|
||||
def run_daemon(max_hashtags: int,
|
||||
def run_daemon(max_shares_on_profile: int,
|
||||
max_hashtags: int,
|
||||
map_format: str,
|
||||
clacks: str,
|
||||
preferred_podcast_formats: [],
|
||||
|
@ -23865,7 +23866,7 @@ def run_daemon(max_hashtags: int,
|
|||
|
||||
# maximum number of shared items attached to actors, as in
|
||||
# https://codeberg.org/fediverse/fep/src/branch/main/fep/0837/fep-0837.md
|
||||
httpd.max_shares_on_profile = 8
|
||||
httpd.max_shares_on_profile = max_shares_on_profile
|
||||
|
||||
# load a list of nicknames for accounts blocking military instances
|
||||
httpd.block_military = load_blocked_military(base_dir)
|
||||
|
|
|
@ -262,6 +262,10 @@ def _command_options() -> None:
|
|||
dest='max_newswire_posts_per_source', type=int,
|
||||
default=4,
|
||||
help='Maximum newswire posts per feed or account')
|
||||
parser.add_argument('--maxSharesOnProfile',
|
||||
dest='max_shares_on_profile', type=int,
|
||||
default=8,
|
||||
help='Maximum shared items shown on profile')
|
||||
parser.add_argument('--dormant_months',
|
||||
dest='dormant_months', type=int,
|
||||
default=3,
|
||||
|
@ -3904,7 +3908,8 @@ def _command_options() -> None:
|
|||
if __name__ == "__main__":
|
||||
argb2, opt2 = _command_options()
|
||||
print('allowdeletion: ' + str(argb2.allowdeletion))
|
||||
run_daemon(argb2.max_hashtags,
|
||||
run_daemon(argb2.max_shares_on_profile,
|
||||
argb2.max_hashtags,
|
||||
argb2.mapFormat,
|
||||
argb2.clacks,
|
||||
opt2['preferred_podcast_formats'],
|
||||
|
|
12
tests.py
12
tests.py
|
@ -870,8 +870,9 @@ def create_server_alice(path: str, domain: str, port: int,
|
|||
clacks = None
|
||||
map_format = 'gpx'
|
||||
max_hashtags = 20
|
||||
max_shares_on_profile = 8
|
||||
print('Server running: Alice')
|
||||
run_daemon(max_hashtags, map_format,
|
||||
run_daemon(max_shares_on_profile, max_hashtags, map_format,
|
||||
clacks, preferred_podcast_formats,
|
||||
check_actor_timeout,
|
||||
crawlers_allowed,
|
||||
|
@ -1045,8 +1046,9 @@ def create_server_bob(path: str, domain: str, port: int,
|
|||
clacks = None
|
||||
map_format = 'gpx'
|
||||
max_hashtags = 20
|
||||
max_shares_on_profile = 8
|
||||
print('Server running: Bob')
|
||||
run_daemon(max_hashtags, map_format,
|
||||
run_daemon(max_shares_on_profile, max_hashtags, map_format,
|
||||
clacks, preferred_podcast_formats,
|
||||
check_actor_timeout,
|
||||
crawlers_allowed,
|
||||
|
@ -1131,8 +1133,9 @@ def create_server_eve(path: str, domain: str, port: int, federation_list: [],
|
|||
clacks = None
|
||||
map_format = 'gpx'
|
||||
max_hashtags = 20
|
||||
max_shares_on_profile = 8
|
||||
print('Server running: Eve')
|
||||
run_daemon(max_hashtags, map_format,
|
||||
run_daemon(max_shares_on_profile, max_hashtags, map_format,
|
||||
clacks, preferred_podcast_formats,
|
||||
check_actor_timeout,
|
||||
crawlers_allowed,
|
||||
|
@ -1219,8 +1222,9 @@ def create_server_group(path: str, domain: str, port: int,
|
|||
clacks = None
|
||||
map_format = 'gpx'
|
||||
max_hashtags = 20
|
||||
max_shares_on_profile = 8
|
||||
print('Server running: Group')
|
||||
run_daemon(max_hashtags, map_format,
|
||||
run_daemon(max_shares_on_profile, max_hashtags, map_format,
|
||||
clacks, preferred_podcast_formats,
|
||||
check_actor_timeout,
|
||||
crawlers_allowed,
|
||||
|
|
Loading…
Reference in New Issue