feat(bot): 🚧 Start migrating to k8s.
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user