Skip to content

Commit

Permalink
Fix #2654 - Remove range retry attempt from mint_all_kudos
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeacom committed Oct 31, 2018
1 parent a6ec332 commit a878e55
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions app/kudos/management/commands/mint_all_kudos.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,23 +155,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 a878e55

Please sign in to comment.