Renovate the module system and implement adding and resuming pool instances using the new relay/alias/network system

This commit is contained in:
2019-01-26 18:58:21 +00:00
parent 4efea3f535
commit 8926cb76ec
37 changed files with 184 additions and 302 deletions

13
main.py
View File

@@ -1,7 +1,6 @@
from json import load, dump, loads
import redis
from redis import StrictRedis
from string import digits
from utils.loaders.command_loader import loadCommands
from utils.logging.log import *
configPath = "conf/"
@@ -43,13 +42,6 @@ def liveNets():
networks.add("".join([x for x in i if not x in digits]))
return networks
def register(command, function):
if not command in CommandMap:
CommandMap[command] = function
debug("Registered command: %s" % command)
else:
error("Duplicate command: %s" % (command))
def saveConf(var):
with open(configPath+filemap[var][0], "w") as f:
dump(globals()[var], f, indent=4)
@@ -66,7 +58,6 @@ def initConf():
def initMain():
global r
initConf()
loadCommands(register)
r = redis.StrictRedis(unix_socket_path=config["RedisSocket"], db=0)
r = StrictRedis(unix_socket_path=config["RedisSocket"], db=0)