Throws if it runs out of retries. If it returns, action succeeded.

async def retry_async(self, func, partition_id, retry_message,
                          final_failure_message, max_retries, host_id):
        """
        Throws if it runs out of retries. If it returns, action succeeded.
        """
        created_okay = False
        retry_count = 0
        while not created_okay and retry_count <= max_retries:
            try:
                await func(partition_id)
                created_okay = True
            except Exception as err:  # pylint: disable=broad-except
                _logger.error("%r %r %r %r", retry_message, host_id, partition_id, err)
                retry_count += 1
        if not created_okay:
            raise Exception(host_id, final_failure_message)