Skip to content

Commit

Permalink
fix usage of get_clr_rounds_metadata (#9559)
Browse files Browse the repository at this point in the history
  • Loading branch information
chibie authored Oct 4, 2021
1 parent f143058 commit 34527d8
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/grants/management/commands/sent_cart_reminder.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def add_arguments(self, parser):

def handle(self, *args, **options):

_, round_start_date, round_end_date, _ = get_clr_rounds_metadata()
_, round_start_date, round_end_date, _, _, _, _, _ = get_clr_rounds_metadata()

last_activity_by_user = CartActivity.objects.filter(latest=True, created_on__gt=round_start_date).exclude(metadata=[])
count = 0
Expand Down
4 changes: 2 additions & 2 deletions app/grants/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ def grants_by_grant_type(request, grant_type):
if _type.get("keyword") == grant_type:
grant_label = _type.get("label")

_, round_start_date, round_end_date, _ = get_clr_rounds_metadata()
_, round_start_date, round_end_date, _, _, _, _, _ = get_clr_rounds_metadata()

params = {
'active': 'grants_explorer',
Expand Down Expand Up @@ -1208,7 +1208,7 @@ def grants_by_grant_clr(request, clr_round):

active_rounds = GrantCLR.objects.filter(is_active=True, start_date__lt=timezone.now(), end_date__gt=timezone.now()).order_by('-total_pot')

_, round_start_date, round_end_date, _ = get_clr_rounds_metadata()
_, round_start_date, round_end_date, _, _, _, _, _ = get_clr_rounds_metadata()

params = {
'active': 'grants_landing',
Expand Down
2 changes: 1 addition & 1 deletion app/marketing/management/commands/post_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def earners(days, cadence):

def grants():

clr_round, _, _, _ = get_clr_rounds_metadata()
clr_round, _, _, _, _, _, _, _ = get_clr_rounds_metadata()
active_clr_rounds = GrantCLR.objects.filter(is_active=True, customer_name='ethereum', start_date__lt=timezone.now(), end_date__gt=timezone.now())
if not active_clr_rounds.exists():
return
Expand Down
2 changes: 1 addition & 1 deletion app/perftools/management/commands/create_page_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def create_hack_event_cache():

def create_top_grant_spenders_cache():

_, round_start_date, _, _ = get_clr_rounds_metadata()
_, round_start_date, _, _, _, _, _, _ = get_clr_rounds_metadata()

grant_types = GrantType.objects.filter(is_visible=True, is_active=True)
for grant_type in grant_types:
Expand Down
2 changes: 1 addition & 1 deletion app/retail/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ def get_kudos_leaderboard(key='kudos_token.artist'):
context['median_contribution'] = round(Contribution.objects.order_by("subscription__amount_per_period_usdt")[median_index].subscription.amount_per_period_usdt, 2)
context['avg_contribution'] = round(grants_gmv / num_contributions, 2)
from grants.utils import get_clr_rounds_metadata
clr_round, _, _, _ = get_clr_rounds_metadata()
clr_round, _, _, _, _, _, _, _ = get_clr_rounds_metadata()
context['num_matching_rounds'] = clr_round
context['ads_served'] = str(round(ManualStat.objects.filter(key='ads_served').order_by('-pk').first().val / 10**6, 1)) + "m"
context['privacy_violations'] = ManualStat.objects.filter(key='privacy_violations').order_by('-pk').first().val
Expand Down
2 changes: 1 addition & 1 deletion scripts/debug/add_squelched_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# total stats


_, round_start_date, round_end_date, _ = get_clr_rounds_metadata()
_, round_start_date, round_end_date, _, _, _, _, _ = get_clr_rounds_metadata()

contributions = Contribution.objects.filter(created_on__gt=round_start_date, created_on__lt=round_end_date, success=True)
pfs = PhantomFunding.objects.filter(created_on__gt=round_start_date, created_on__lt=round_end_date)
Expand Down
2 changes: 1 addition & 1 deletion scripts/debug/address_usage_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# total stats

_, round_start_date, round_end_date, _ = get_clr_rounds_metadata()
_, round_start_date, round_end_date, _, _, _, _, _ = get_clr_rounds_metadata()

contributions = Contribution.objects.filter(created_on__gt=round_start_date, created_on__lt=round_end_date, success=True)
pfs = PhantomFunding.objects.filter(created_on__gt=round_start_date, created_on__lt=round_end_date)
Expand Down
2 changes: 1 addition & 1 deletion scripts/debug/grants_collusion_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# total stats

_, round_start_date, round_end_date, _ = get_clr_rounds_metadata()
_, round_start_date, round_end_date, _, _, _, _, _ = get_clr_rounds_metadata()


contributions = Contribution.objects.filter(created_on__gt=round_start_date, created_on__lt=round_end_date, success=True)
Expand Down
2 changes: 1 addition & 1 deletion scripts/debug/grants_export.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from grants.models import Grant
from grants.utils import get_clr_rounds_metadata

clr_round, _, _, _ = get_clr_rounds_metadata()
clr_round, _, _, _, _, _, _, _ = get_clr_rounds_metadata()

# total stats

Expand Down

0 comments on commit 34527d8

Please sign in to comment.