Implement indexing into Apache Druid #1

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

View File

@ -1,6 +1,7 @@
import main
from modules import chankeep
def get_first_relay(net):
"""
Get the first relay in the network.
@ -9,7 +10,7 @@ def get_first_relay(net):
:return: IRCPool instance for the IRC bot
"""
cur_relay = 0
max_relay = len(main.network[net].relays.keys())+1
max_relay = len(main.network[net].relays.keys()) + 1
activeRelays = chankeep.getActiveRelays(net)
while cur_relay != max_relay:
cur_relay += 1
@ -20,6 +21,7 @@ def get_first_relay(net):
return main.IRCPool[name]
return None
def is_first_relay(net, num):
"""
Determine if we are the first relay for the network.