diff --git a/api/graph.py b/api/graph.py index 965dd845c1c1e7db0f3c718fce6c178966992b32..1507555eba3bdaf1f3842b791a850afee8c73cdf 100644 --- a/api/graph.py +++ b/api/graph.py @@ -35,7 +35,8 @@ class Graph(object): "statement_to_issue_time": t7, "user_rates_own_positions_time": t8, "random_ratings_time": t9, - "delete_zero_ratings_time": t10 + "delete_zero_ratings_time": t10, + "total": sum([t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10]) } def run(self, func): @@ -136,7 +137,8 @@ class Graph(object): result = tx.run( "MATCH (user:User) " "WHERE NOT EXISTS((user)-[:LIKES]->()) " - "MATCH (statement:Statement{is_position: True}) " + "MATCH (statement:Statement) " + "WHERE statement.is_position " "MERGE (user)-[:LIKES{rating:round(rand()*5)}]->(statement)" ) return result