Skip to content

Commit

Permalink
collusion test
Browse files Browse the repository at this point in the history
  • Loading branch information
sara-santana committed Nov 29, 2024
1 parent fd3c2fa commit acc19da
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions beacon/scripts/collusion_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,20 @@ def query_variant_with_curl(access_token, alt, ref, start, end, vType):
return result.stdout, result.stderr


def update_user_budget_to_initial(individual_id):

def update_individual_budget(individual_id):
try:
budget_collection = client.beacon['budget']
#LOG.debug(f"Updating budget for individual_id={individual_id} by amount={amount}")

# Find the document and update it, returning the updated document
updated_document = budget_collection.find_one_and_update(
{"individualId": individual_id, "userId": "Bearer collusion"},
{"individualId": individual_id},
{"$set": {"budget": -math.log10(0.5)}},
return_document=ReturnDocument.AFTER # Return the updated document
)

return updated_document


print("BLA BLA BLA")
print("THE BUDGET WAS UPDATED, SO 1 MORE USER")
print("!!!!!!!!!!!!!!!!!!!!!!!!!!!")

except Exception as e:
return None

Expand Down

0 comments on commit acc19da

Please sign in to comment.