sample_scenarios/multiple_updates_to_a_document.py [38:54]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            logger.info('Updating PendingPenaltyTicketAmount for License Number: {license_number}'
                        ' to {amount}'.format(license_number=license_number, amount=pending_amount))

            transaction_executor.execute_statement(statement, pending_amount, license_number)


if __name__ == '__main__':
    """
    Updating documents multiple times in VehicleRegistration table.
    """
    try:
        with create_qldb_session() as session:
            session.execute_lambda(lambda executor: update_documents(executor),
                                   lambda retry_attempt: logger.info('Retrying due to OCC conflict...'))
            logger.info('Documents updated successfully!')
    except Exception:
        logger.exception('Error updating documents.')
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



sample_scenarios/single_update_to_document.py [31:47]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        logger.info('Updating PendingPenaltyTicketAmount for License Number: {license_number}'
                    ' to {amount}'.format(license_number=license_number, amount=pending_amount))

        transaction_executor.execute_statement(statement, pending_amount, license_number)


if __name__ == '__main__':
    """
    Updating documents in VehicleRegistration table in QLDB ledger.
    """
    try:
        with create_qldb_session() as session:
            session.execute_lambda(lambda executor: update_documents(executor),
                                   lambda retry_attempt: logger.info('Retrying due to OCC conflict...'))
            logger.info('Documents updated successfully!')
    except Exception:
        logger.exception('Error updating documents.')
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



