Skip to content

Commit

Permalink
Remove range retry attempt from mint_all_kudos (#2659)
Browse files Browse the repository at this point in the history
* Fix #2654 - Remove range retry attempt from mint_all_kudos

* Remove unused time import
  • Loading branch information
Mark Beacom authored Nov 1, 2018
1 parent f1ce3d7 commit f2ba76d
Showing 1 changed file with 13 additions and 19 deletions.
32 changes: 13 additions & 19 deletions app/kudos/management/commands/mint_all_kudos.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"""
import logging
import time
import urllib
import warnings

Expand Down Expand Up @@ -155,23 +154,18 @@ def handle(self, *args, **options):

is_live = options['live']
if is_live:
for __ in range(1, 4):
try:
token_uri_url = kudos_contract.create_token_uri_url(**metadata)
args = (mint_to, kudos['priceFinney'], kudos['numClonesAllowed'], token_uri_url)
kudos_contract.mint(
*args,
account=account,
private_key=private_key,
skip_sync=skip_sync,
gas_price_gwei=gas_price_gwei,
)
print('Live run - Name: ', readable_name, ' - Account: ', account, 'Minted!')
except Exception as e:
logger.error('Error: %s - Trying to mint again' % e)
time.sleep(2)
continue
else:
break
try:
token_uri_url = kudos_contract.create_token_uri_url(**metadata)
args = (mint_to, kudos['priceFinney'], kudos['numClonesAllowed'], token_uri_url)
kudos_contract.mint(
*args,
account=account,
private_key=private_key,
skip_sync=skip_sync,
gas_price_gwei=gas_price_gwei,
)
print('Live run - Name: ', readable_name, ' - Account: ', account, 'Minted!')
except Exception as e:
print(f'Error minting: {readable_name} - {e}')
else:
print('Dry run - Name: ', readable_name, ' - Account: ', account, 'Skipping!')

0 comments on commit f2ba76d

Please sign in to comment.