Libraries refactor and add some sinks #4

Closed
m wants to merge 136 commits from library-refactor into master
1 changed files with 3 additions and 3 deletions
Showing only changes of commit 21b5a839c1 - Show all commits

View File

@ -563,7 +563,7 @@ class Agora(object):
min_margin_ad_not_us = min(ads_without_us, key=lambda x: x[3])
self.log.debug("Min margin ad not us: {x}", x=min_margin_ad_not_us)
# Lowball the lowest ad that is not ours
lowball_lowest_not_ours = min_margin_ad_not_us[3] - 0.001
lowball_lowest_not_ours = min_margin_ad_not_us[3] # - 0.005
self.log.debug("Lowball lowest not ours: {x}", x=lowball_lowest_not_ours)
# Check if the username field of the cheapest ad matches ours
@ -599,7 +599,7 @@ class Agora(object):
return float(settings.Agora.MaxMargin)
# Find cheapest ad above our min that is not us
cheapest_ad = min(ads_above_our_min_not_us, key=lambda x: x[3])
cheapest_ad_margin = cheapest_ad[3] - 0.001
cheapest_ad_margin = cheapest_ad[3] # - 0.005
if cheapest_ad_margin > float(settings.Agora.MaxMargin):
self.log.debug("Cheapest ad not ours more than MaxMargin")
return float(settings.Agora.MaxMargin)
@ -810,7 +810,7 @@ class Agora(object):
rtrn = self.agora._api_call(api_method=f"contact_release/{contact_id}", http_method="POST", query_values=payload)
# Check if we can withdraw funds
self.withdraw_funds()
# self.withdraw_funds()
return rtrn