Added additional caching message on debug
This commit is contained in:
parent
e2d28f442c
commit
d090b18655
@ -22,8 +22,10 @@ if configGet("enabled", "scheduler", "cache_members"):
|
|||||||
list_of_users = []
|
list_of_users = []
|
||||||
async for member in app.get_chat_members(configGet("users", "groups")):
|
async for member in app.get_chat_members(configGet("users", "groups")):
|
||||||
list_of_users.append(member.user.id)
|
list_of_users.append(member.user.id)
|
||||||
makedirs("cache", exist_ok=True)
|
makedirs(configGet("cache", "locations"), exist_ok=True)
|
||||||
jsonSave(list_of_users, path.join(configGet("cache", "locations"), "group_members"))
|
jsonSave(list_of_users, path.join(configGet("cache", "locations"), "group_members"))
|
||||||
|
if configGet("debug") is True:
|
||||||
|
logWrite("User group caching performed")
|
||||||
|
|
||||||
if configGet("enabled", "scheduler", "cache_admins"):
|
if configGet("enabled", "scheduler", "cache_admins"):
|
||||||
@scheduler.scheduled_job(trigger="interval", seconds=configGet("interval", "scheduler", "cache_admins"))
|
@scheduler.scheduled_job(trigger="interval", seconds=configGet("interval", "scheduler", "cache_admins"))
|
||||||
@ -31,8 +33,10 @@ if configGet("enabled", "scheduler", "cache_admins"):
|
|||||||
list_of_users = []
|
list_of_users = []
|
||||||
async for member in app.get_chat_members(configGet("admin", "groups")):
|
async for member in app.get_chat_members(configGet("admin", "groups")):
|
||||||
list_of_users.append(member.user.id)
|
list_of_users.append(member.user.id)
|
||||||
makedirs("cache", exist_ok=True)
|
makedirs(configGet("cache", "locations"), exist_ok=True)
|
||||||
jsonSave(list_of_users, path.join(configGet("cache", "locations"), "admins"))
|
jsonSave(list_of_users, path.join(configGet("cache", "locations"), "admins"))
|
||||||
|
if configGet("debug") is True:
|
||||||
|
logWrite("Admin group caching performed")
|
||||||
|
|
||||||
# Cache the avatars of group members
|
# Cache the avatars of group members
|
||||||
if configGet("enabled", "scheduler", "cache_avatars"):
|
if configGet("enabled", "scheduler", "cache_avatars"):
|
||||||
|
Reference in New Issue
Block a user