Skip to content

Commit 50238f1

Browse files
committed
resolved abrupt exit issue with rank - all systems running well now
1 parent f2fd15a commit 50238f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ranking_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def update_portfolio_values(client):
279279
holdings_collection.update_one({"strategy": strategy_doc["strategy"]}, {"$set": {"portfolio_value": portfolio_value}}, upsert=True)
280280

281281
# Update MongoDB with the modified strategy documents
282-
client.close()
282+
283283

284284
def update_ranks(client):
285285
""""
@@ -313,7 +313,7 @@ def update_ranks(client):
313313
_, _, _, strategy_name = heapq.heappop(q)
314314
rank_collection.insert_one({"strategy": strategy_name, "rank": rank})
315315
rank+=1
316-
client.close()
316+
317317

318318
def main():
319319
"""

0 commit comments

Comments
 (0)