sharding (general): Add launch data filters.

Filter cached reaction role messages by shardid.
Filter expiring rented room by shardid.
Filter scanned study badges by shardid.
Filter resumed study sessions by shardid.
Filter resumed workouts by shardid.

Fix a spacing issue in the log printer.
This commit is contained in:
2021-12-22 17:26:49 +02:00
parent 25e22c07d0
commit 276886a3a7
6 changed files with 18 additions and 9 deletions

View File

@@ -12,6 +12,7 @@ from discord import PartialEmoji
from meta import client
from core import Lion
from data import Row
from data.conditions import THIS_SHARD
from utils.lib import utc_now
from settings import GuildSettings
@@ -584,5 +585,5 @@ def load_reaction_roles(client):
"""
Load the ReactionRoleMessages.
"""
rows = reaction_role_messages.fetch_rows_where()
rows = reaction_role_messages.fetch_rows_where(guildid=THIS_SHARD)
ReactionRoleMessage._messages = {row.messageid: ReactionRoleMessage(row.messageid) for row in rows}