Changeset 3350 for WAeUP_SRP/base/skins


Ignore:
Timestamp:
18 Mar 2008, 18:24:53 (17 years ago)
Author:
joachim
Message:

some fixes
example with_timing enabled

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/admitStudents.py

    r3349 r3350  
    4444admitted = 0
    4545cocount = 0
    46 old_commit_count = -1
     46old_commit_count = 0
    4747commit_after = 40
    4848d = {'status': 'created'}
     
    5757        logger.info("Committing %s transactions, total %s" % (commit_after,count))
    5858        cocount += 1
    59         if cocount > 2:
     59        if with_timing and cocount > 2:
    6060            break
    6161    brain = aq_applicants(Eq('reg_no',reg_no))[0]
     
    7272        if with_timing:
    7373            data = context.waeup_tool.get_timing_data()
    74             logger.info("timing %(i_time)6.2f/%(a_time)6.2f" % data['total'])
     74            for k,d in data.items():
     75                s = "timing line %s" % k
     76                s += " %(i_time)6.2f/%(a_time)6.2f" % d
     77                logger.info(s)
    7578        admitted += 1
    7679    else:
Note: See TracChangeset for help on using the changeset viewer.