fixed debug logging

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
Arthur Lu 2021-10-28 21:12:28 +00:00
parent 7be48af85e
commit bd87111e08

View File

@ -308,15 +308,10 @@ def main(send, verbose = False, profile = False, debug = False):
current_module.load_data() current_module.load_data()
current_module.process_data(exec_threads) current_module.process_data(exec_threads)
current_module.push_results() current_module.push_results()
print(m + " module finished in " + str(time.time() - start) + " seconds") send(stdout, INF, m + " module finished in " + str(time.time() - start) + " seconds")
if debug: if debug:
f = open("matchloop.log", "w+") f = open(m + ".log", "w+")
json.dump(match_results, f, ensure_ascii=False, indent=4) json.dump({"data": current_module.data, "results":current_module.results}, f, ensure_ascii=False, indent=4)
f.close()
f = open("pitloop.log", "w+")
json.dump(pit_results, f, ensure_ascii=False, indent=4)
f.close() f.close()
set_current_time(client, loop_start) set_current_time(client, loop_start)