Ignore:
Timestamp:
10 Dec 2007, 23:57:23 (17 years ago)
Author:
Henrik Bettermann
Message:

fix for #41 in fceokene-trac

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_epayment/upgradePayments.py

    r2915 r2918  
    5050logger.info("found %d payments" % total)
    5151sid = "xxx"
    52 count = 1
     52count = 0
    5353commit_after = 5
    54 commit_count = 0
     54#commit_count = 0
    5555
    5656student_id = ''
    5757for payment_brain in payments:
     58    count += 1
    5859    payment = payment_brain.getObject()
    5960    if payment_brain.getPath().split('/')[-3] != student_id:
     
    6263    payment['updatePayment'](student_record)
    6364    logger.info('upgraded student %s payment %s' % (student_record.id,payment.getId()))
    64     if not count % commit_after:
    65         logger.info("committing %d total %d" % (commit_after,count))
     65    #if not count % commit_after:
     66    #    logger.info("committing %d total %d" % (commit_after,count))
    6667        #commit_count += 1
    6768        #if not commit_count % 2:
    6869        #    break
    69     count += 1
    7070logger.info("%d of %d upgraded" % (count,total))
Note: See TracChangeset for help on using the changeset viewer.