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 Mar 4, 2021
2 parents f84e7be + a608de8 commit 6b84589
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions app/economy/management/commands/get_prices.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ def coingecko(source, tokens):

url = f'https://api.coingecko.com/api/v3/simple/price?ids={token_str}&vs_currencies=usd,eth'

print(url)

response = requests.get(url).json()

for token in tokens:
Expand Down Expand Up @@ -358,15 +360,6 @@ def handle(self, *args, **options):
except Exception as e:
print(e)

if not options['perform_obj_updates']:
return

try:
print('cryptocompare')
cryptocompare()
except Exception as e:
print(e)

try:
source = 'coingecko'
coingecko_tokens = approved_tokens.filter(conversion_rate_source=source)
Expand All @@ -376,6 +369,15 @@ def handle(self, *args, **options):
except Exception as e:
print(e)

if not options['perform_obj_updates']:
return

try:
print('cryptocompare')
cryptocompare()
except Exception as e:
print(e)

try:
print('refresh')
refresh_bounties()
Expand Down

0 comments on commit 6b84589

Please sign in to comment.