Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc committed Sep 29, 2021
2 parents f7447ab + 8eb83dd commit 6538dab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions app/grants/templatetags/grants_extra.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ def modulo(num, val):
int: The modulo of number and value.
"""

return num % val
if num and val:
return num % val
return 0

@register.simple_tag
def is_team_member(grant, profile):
Expand Down
3 changes: 2 additions & 1 deletion app/perftools/management/commands/create_jtbd_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def create_jtbd_earn_cache():
thirty_days_ago = timezone.now() - datetime.timedelta(days=30)

bounties = list(Bounty.objects.filter(
network='mainnet', event=None, idx_status='open', created_on__gt=thirty_days_ago
network='mainnet', event=None, idx_status='open', created_on__gt=thirty_days_ago,
current_bounty=True
).order_by('-_val_usd_db').extra(
select={'val_usd_db': '_val_usd_db'}
).values(
Expand Down
5 changes: 4 additions & 1 deletion scripts/crontab
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/us
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
0 19 * * 7 cd gitcoin/coin; bash scripts/run_management_command_if_not_already_running.bash vacuum >> /var/log/gitcoin/vacuum.log 2>&1
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
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

# every day at 6PM
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

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


Expand Down

0 comments on commit 6538dab

Please sign in to comment.