Renovate the module system and implement adding and resuming pool instances using the new relay/alias/network system
This commit is contained in:
13
main.py
13
main.py
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user