feat(bot): 🚧 Start migrating to k8s.

This commit is contained in:
Nyeki.py
2024-10-30 15:38:00 -03:00
parent 01c4a95ff3
commit 345e44137a
17 changed files with 304 additions and 40 deletions
+5 -3
View File
@@ -5,8 +5,6 @@ from datetime import datetime, timezone
from payphone.core import logging
logging.setup()
log = logging.logger
@@ -28,13 +26,15 @@ def shard(
from payphone.db import setup
from payphone.bot import bot
from payphone.core import config
from payphone.core import config, logging
bot.shard_ids = [shard_id]
bot.shard_count = shard_count
bot.shutdown = shutdown
bot.scheduled_shutdown = scheduled_shutdown
logging.setup(f"Shard {shard_id}")
log.info("Running shard %s with default loop.", shard_id)
bot.loop.set_debug(True)
@@ -84,6 +84,8 @@ if __name__ == "__main__":
from payphone.db import setup, models
from payphone.core import config
logging.setup("Payphone")
redis = aredis.Redis(host="localhost" if config.IS_DEBUG else "redis")
async def init():