|
|
|
@ -74,7 +74,12 @@ def login_done(res):
|
|
|
|
|
settings["loggedin"] = res
|
|
|
|
|
settings["continueui"] = True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def blockdata_done(res):
|
|
|
|
|
fprint("FINISHED downloading block data")
|
|
|
|
|
#block_res = pool.apply_async(block.block_conn, (config, datafile, res))
|
|
|
|
|
block.block_conn(config, datafile, res)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def killall():
|
|
|
|
|
kids = active_children()
|
|
|
|
|
for kid in kids:
|
|
|
|
@ -82,11 +87,7 @@ def killall():
|
|
|
|
|
fprint("Every child has been killed")
|
|
|
|
|
os.kill(os.getpid(), 9) # dirty kill of self
|
|
|
|
|
|
|
|
|
|
def kill(pid):
|
|
|
|
|
setup_child()
|
|
|
|
|
fprint("Killing PID " + str(pid))
|
|
|
|
|
#os.kill(pid, 9)
|
|
|
|
|
fprint("Signal 9 sent to PID " + str(pid))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def mainloop(pool):
|
|
|
|
|
# worker pool: netstat, netstat cleanup, upload, download, ui tasks
|
|
|
|
@ -133,8 +134,10 @@ def mainloop(pool):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if settings["block"] == True:
|
|
|
|
|
blockdata_res = pool.apply_async(block.get_blocklist, (config,)) #, callback=blockdata_done)
|
|
|
|
|
blockdata_res = pool.apply_async(block.get_blocklist, (config,), callback=blockdata_done)
|
|
|
|
|
#block.get_blocklist(config)
|
|
|
|
|
settings["block"] = False
|
|
|
|
|
|
|
|
|
|
#fprint(settings["killbox"])
|
|
|
|
|
if len(settings["killbox"]) > 0:
|
|
|
|
|
fprint("Kill opportunity!")
|
|
|
|
|