Implement indexing into Apache Druid #1

Closed
m wants to merge 263 commits from druid into master
1 changed files with 19 additions and 19 deletions
Showing only changes of commit f004bd47af - Show all commits

View File

@ -194,25 +194,6 @@ class API(object):
} }
return dumps(networks) return dumps(networks)
@app.route("/irc/network/<net>/", methods=["POST"])
@login_required
def irc_network(self, request, net):
if net not in main.network.keys():
return dumps({"success": False, "reason": "no such net."})
inst = main.network[net]
network = {}
network["net"] = inst.net
network["auth"] = inst.auth
network["host"] = inst.host
network["last"] = inst.last
network["port"] = inst.port
network["security"] = inst.security
network["relays"] = len(inst.relays)
network["chanlimit"] = inst.chanlimit
network["channels"] = userinfo.getTotalChanNum(net)
network["records"] = userinfo.getNumWhoEntries(net)
return dumps(network)
@app.route("/irc/network/auth/", methods=["POST"]) @app.route("/irc/network/auth/", methods=["POST"])
@login_required @login_required
def irc_network_recheckauth(self, request): def irc_network_recheckauth(self, request):
@ -249,6 +230,25 @@ class API(object):
regproc.registerAccount(conn.net, conn.num) regproc.registerAccount(conn.net, conn.num)
return dumps({"success": True}) return dumps({"success": True})
@app.route("/irc/network/<net>/", methods=["POST"])
@login_required
def irc_network(self, request, net):
if net not in main.network.keys():
return dumps({"success": False, "reason": "no such net."})
inst = main.network[net]
network = {}
network["net"] = inst.net
network["auth"] = inst.auth
network["host"] = inst.host
network["last"] = inst.last
network["port"] = inst.port
network["security"] = inst.security
network["relays"] = len(inst.relays)
network["chanlimit"] = inst.chanlimit
network["channels"] = userinfo.getTotalChanNum(net)
network["records"] = userinfo.getNumWhoEntries(net)
return dumps(network)
@app.route("/irc/network/<net>/", methods=["DELETE"]) @app.route("/irc/network/<net>/", methods=["DELETE"])
@login_required @login_required
def irc_network_delete(self, request, net): def irc_network_delete(self, request, net):