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