From a878e556fd47af38e87353668fc9f99d255120d4 Mon Sep 17 00:00:00 2001 From: Mark Beacom Date: Wed, 31 Oct 2018 17:32:13 -0400 Subject: [PATCH] Fix #2654 - Remove range retry attempt from mint_all_kudos --- .../management/commands/mint_all_kudos.py | 31 ++++++++----------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/app/kudos/management/commands/mint_all_kudos.py b/app/kudos/management/commands/mint_all_kudos.py index 277226ce18a..99f5034fc61 100644 --- a/app/kudos/management/commands/mint_all_kudos.py +++ b/app/kudos/management/commands/mint_all_kudos.py @@ -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!')