Use config object

This commit is contained in:
Jose Gracia 2023-11-20 16:06:09 +01:00
parent 8596fb4184
commit bacc9e63c9

View file

@ -167,17 +167,16 @@ class Power:
if __name__ == "__main__":
args = parse_arguments()
config = parse_arguments()
config.interval = 5
conn = init_db()
jobid = args.jobid
interval = 5
query = init_query(jobid, interval)
query = init_query(config.jobid, config.interval)
all_list = db_to_list(conn, query)
#all_df = db_to_df(conn, query)
power = Power.from_list(all_list) # , jobid, interval)
power = Power.from_list(all_list)
#print("#epochs", len(power.epochs))
#
#print(power.header())
@ -188,7 +187,7 @@ if __name__ == "__main__":
#print('time:', power.summarize_time(ts))
#print('values:', power.summarize_values(values))
#print('epoch:', power.pretty_print(power.summarize_epoch((ts, values))))
print("filename: ", power.to_file(jobid))
print("filename: ", power.to_file(config.jobid))