|
|
@ -74,6 +74,11 @@ def login_done(res):
|
|
|
|
settings["loggedin"] = res
|
|
|
|
settings["loggedin"] = res
|
|
|
|
settings["continueui"] = True
|
|
|
|
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():
|
|
|
|
def killall():
|
|
|
|
kids = active_children()
|
|
|
|
kids = active_children()
|
|
|
@ -82,11 +87,7 @@ def killall():
|
|
|
|
fprint("Every child has been killed")
|
|
|
|
fprint("Every child has been killed")
|
|
|
|
os.kill(os.getpid(), 9) # dirty kill of self
|
|
|
|
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):
|
|
|
|
def mainloop(pool):
|
|
|
|
# worker pool: netstat, netstat cleanup, upload, download, ui tasks
|
|
|
|
# worker pool: netstat, netstat cleanup, upload, download, ui tasks
|
|
|
@ -133,8 +134,10 @@ def mainloop(pool):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if settings["block"] == True:
|
|
|
|
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
|
|
|
|
settings["block"] = False
|
|
|
|
|
|
|
|
|
|
|
|
#fprint(settings["killbox"])
|
|
|
|
#fprint(settings["killbox"])
|
|
|
|
if len(settings["killbox"]) > 0:
|
|
|
|
if len(settings["killbox"]) > 0:
|
|
|
|
fprint("Kill opportunity!")
|
|
|
|
fprint("Kill opportunity!")
|
|
|
|