Replacing hard coded number with static variable

This commit is contained in:
Brandon Rozek 2022-05-21 00:14:38 -04:00
parent 85b76c5627
commit a8ecad7bba

View file

@ -30,7 +30,7 @@ def retrieve_toots_from_server():
global MAX_TOOT_ID global MAX_TOOT_ID
server_data = [] server_data = []
for _ in range(math.ceil(RETRIEVE_NUM_TOOTS // 40)): for _ in range(math.ceil(RETRIEVE_NUM_TOOTS // MAX_TOOTS_PER_QUERY)):
# Grab toots from Mastodon # Grab toots from Mastodon
limit_param = "?limit=" + str(RETRIEVE_NUM_TOOTS) \ limit_param = "?limit=" + str(RETRIEVE_NUM_TOOTS) \
if RETRIEVE_NUM_TOOTS > 0 else "?" if RETRIEVE_NUM_TOOTS > 0 else "?"