Celery tasks stop working after redis files become too large

I am encountering many issues with the upgrade (notably Mysql initialisation error when upgrading tutor), so I think I will try adding the lines to the redis.conf file.

I understand that directly editing $(tutor config printroot)/env/apps/reddit/reddit.conf is not the way to go since the env folder will be regenerated every time I do tutor config save.

However, I also understand that I cannot use a plugin via openedx-lms-common-settings with the redis-conf template patch unless I upgrade tutor to a version post your linked commit. I have instead tried a custom plugin, i.e.:

from tutor import hooks

hooks.Filters.ENV_PATCHES.add_items(
    [
        (
            "redis",
            """
            echo "maxmemory {{ REDIS_MAX_MEMORY }}" >> $(tutor config printroot)/apps/redis/redis.conf
            echo "maxmemory-policy {{ REDIS_MAX_MEMORY_POLICY }}" >> $(tutor config printroot)/apps/redis/redis.conf
            """,
        ),
    ]
)

However, without luck. Is this the rigth way to go? What am I doing wrong?

Thank you. Best,
Martí