Skip to content
Snippets Groups Projects
Commit 02a47cdb authored by Jonah Husson's avatar Jonah Husson
Browse files

Fix error handling on push_point_info

parent 9c0fe7b2
No related branches found
No related tags found
1 merge request!6Fix error handling on push_point_info
......@@ -137,10 +137,14 @@ def process_period(conn, substrate, keypair, point_info, start_period, end_perio
negative.append([key, abs(value)])
# Push pointing to blockchain
try:
if len(positive) > 0:
push_point_info(substrate, positive_points_func, keypair, positive)
if len(negative) > 0:
push_point_info(substrate, negative_points_func, keypair, negative)
except Exception as e:
log.error(f"Failed to push point info: {e}")
raise e
with open(raw_points_log, "a") as f:
f.write(f"[{datetime.datetime.now()}] {raw_points}\n")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment