Skip to content

Commit 6538dab

Browse files
committed
Merge remote-tracking branch 'upstream/stable'
2 parents f7447ab + 8eb83dd commit 6538dab

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

app/grants/templatetags/grants_extra.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ def modulo(num, val):
5757
int: The modulo of number and value.
5858
5959
"""
60-
61-
return num % val
60+
if num and val:
61+
return num % val
62+
return 0
6263

6364
@register.simple_tag
6465
def is_team_member(grant, profile):

app/perftools/management/commands/create_jtbd_cache.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ def create_jtbd_earn_cache():
5252
thirty_days_ago = timezone.now() - datetime.timedelta(days=30)
5353

5454
bounties = list(Bounty.objects.filter(
55-
network='mainnet', event=None, idx_status='open', created_on__gt=thirty_days_ago
55+
network='mainnet', event=None, idx_status='open', created_on__gt=thirty_days_ago,
56+
current_bounty=True
5657
).order_by('-_val_usd_db').extra(
5758
select={'val_usd_db': '_val_usd_db'}
5859
).values(

scripts/crontab

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/us
104104
30 * * * * cd gitcoin/coin; bash scripts/run_management_command_if_not_already_running.bash create_gas_history >> /var/log/gitcoin/create_gas_history.log 2>&1
105105
0 19 * * 7 cd gitcoin/coin; bash scripts/run_management_command_if_not_already_running.bash vacuum >> /var/log/gitcoin/vacuum.log 2>&1
106106
2 */3 * * * cd gitcoin/coin; bash scripts/run_management_command_if_not_already_running.bash create_page_cache >> /var/log/gitcoin/create_page_cache.log 2>&1
107-
30 */3 * * * cd gitcoin/coin; bash scripts/run_management_command_if_not_already_running.bash create_jtbd_cache >> /var/log/gitcoin/create_jtbd_cache.log 2>&1
107+
108+
# every day at 6PM
109+
0 18 * * * cd gitcoin/coin; bash scripts/run_management_command_if_not_already_running.bash create_jtbd_cache >> /var/log/gitcoin/create_jtbd_cache.log 2>&1
110+
108111
1 */30 * * * cd gitcoin/coin; bash scripts/run_management_command_if_not_already_running.bash create_activity_cache >> /var/log/gitcoin/create_activity_cache.log 2>&1
109112

110113

0 commit comments

Comments
 (0)