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:
@@ -1,9 +1,6 @@
|
||||
import configparser as cfgp
|
||||
|
||||
|
||||
conf = None # type: Conf
|
||||
|
||||
CONF_FILE = "bot/bot.conf"
|
||||
from .args import args
|
||||
|
||||
|
||||
class Conf:
|
||||
@@ -57,3 +54,6 @@ class Conf:
|
||||
def write(self):
|
||||
with open(self.configfile, 'w') as conffile:
|
||||
self.config.write(conffile)
|
||||
|
||||
|
||||
conf = Conf(args.config)
|
||||
|
||||
Reference in New Issue
Block a user