sharding (core): Add base sharding support.
Add `meta.args` for command line argument access. Add command line argument support for shard number. Add shard count to config file. Add `meta.sharding` exposing shard properties. Add shard number to logging methods. Add shard number to data appid.
This commit is contained in:
9
bot/meta/sharding.py
Normal file
9
bot/meta/sharding.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from .args import args
|
||||
from .config import conf
|
||||
|
||||
|
||||
shard_number = args.shard or 0
|
||||
|
||||
shard_count = conf.bot.getint('shard_count', 1)
|
||||
|
||||
sharded = (shard_count > 0)
|
||||
Reference in New Issue
Block a user