Implement indexing into Apache Druid #1
3
main.py
3
main.py
|
@ -5,7 +5,6 @@ from os.path import exists
|
|||
from string import digits
|
||||
|
||||
from redis import StrictRedis
|
||||
from os import getenv
|
||||
|
||||
# List of errors ZNC can give us
|
||||
ZNCErrors = ["Error:", "Unable to load", "does not exist", "doesn't exist"]
|
||||
|
@ -72,7 +71,7 @@ def liveNets():
|
|||
|
||||
def saveConf(var):
|
||||
if var in ("help", "aliasdata"):
|
||||
return # no need to save this
|
||||
return # no need to save this
|
||||
if filemap[var][2] == "json":
|
||||
with open(configPath + filemap[var][0], "w") as f:
|
||||
json.dump(globals()[var], f, indent=4)
|
||||
|
|
19
threshold
19
threshold
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
from codecs import getwriter
|
||||
from os import getenv
|
||||
from signal import SIGINT, signal
|
||||
from sys import stderr, stdout
|
||||
|
||||
|
@ -19,7 +20,6 @@ from core.server import ServerFactory
|
|||
from utils.cleanup import handler
|
||||
from utils.loaders.command_loader import loadCommands
|
||||
from utils.logging.log import log
|
||||
from os import getenv
|
||||
|
||||
Factory.noisy = False
|
||||
|
||||
|
@ -39,7 +39,7 @@ stdout = getwriter("utf8")(stdout) # this is a generic fix but we all know
|
|||
stderr = getwriter("utf8")(stderr) # it's just for the retards on Rizon using
|
||||
# unicode quit messages for no reason
|
||||
|
||||
trues = ('true', '1', 't', True)
|
||||
trues = ("true", "1", "t", True)
|
||||
|
||||
# Main listener
|
||||
listener_address = getenv("THRESHOLD_LISTENER_HOST", main.config["Listener"]["Address"])
|
||||
|
@ -71,10 +71,7 @@ if __name__ == "__main__":
|
|||
),
|
||||
interface=listener_address,
|
||||
)
|
||||
log(
|
||||
"Threshold running with SSL on %s:%s"
|
||||
% (listener_address, listener_port)
|
||||
)
|
||||
log("Threshold running with SSL on %s:%s" % (listener_address, listener_port))
|
||||
else:
|
||||
reactor.listenTCP(
|
||||
listener_port,
|
||||
|
@ -94,20 +91,14 @@ if __name__ == "__main__":
|
|||
),
|
||||
interface=relay_address,
|
||||
)
|
||||
log(
|
||||
"Threshold relay running with SSL on %s:%s"
|
||||
% (relay_address, relay_port)
|
||||
)
|
||||
log("Threshold relay running with SSL on %s:%s" % (relay_address, relay_port))
|
||||
else:
|
||||
reactor.listenTCP(
|
||||
relay_port,
|
||||
relay,
|
||||
interface=relay_address,
|
||||
)
|
||||
log(
|
||||
"Threshold relay running on %s:%s"
|
||||
% (relay_address, relay_port)
|
||||
)
|
||||
log("Threshold relay running on %s:%s" % (relay_address, relay_port))
|
||||
for net in main.network.keys():
|
||||
main.network[net].start_bots()
|
||||
modules.counters.setupCounterLoop()
|
||||
|
|
Loading…
Reference in New Issue