rewrite: Implement shard IPC server.

This commit is contained in:
2022-11-03 15:36:39 +02:00
parent 88861f3880
commit fd04b825f2
10 changed files with 460 additions and 17 deletions

20
run_server.py Normal file
View File

@@ -0,0 +1,20 @@
import sys
import os
import argparse
import asyncio
sys.path.insert(0, os.path.join(os.getcwd(), "bot"))
from bot.meta.ipc.server import AppServer
from bot.meta import conf
async def main():
address = {'host': conf.appipc['server_host'], 'port': int(conf.appipc['server_port'])}
server = AppServer()
await server.start(address)
if __name__ == '__main__':
asyncio.run(main())