Changeset 3350


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

some fixes
example with_timing enabled

Location:
WAeUP_SRP/base
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r3349 r3350  
    10171017        application = student_object.application
    10181018        #self.portal_workflow.doActionFor(application,'open',dest_container=application)
    1019         self.do_timing()
     1019        #self.do_timing()
    10201020        da = {'Title': 'Application Data'}
    10211021        da['jamb_reg_no'] = reg_no
     
    10601060        personal = student_object.personal
    10611061        #self.portal_workflow.doActionFor(personal,'open',dest_container=personal)
    1062         self.do_timing()
     1062        #self.do_timing()
    10631063        dp = {'Title': 'Personal Data'}
    10641064        dp['sex'] = brain.sex
     
    10881088        studycourse = student_object.study_course
    10891089        #self.portal_workflow.doActionFor(studycourse,'open',dest_container=studycourse)
    1090         self.do_timing()
     1090        #self.do_timing()
    10911091        dsc = {}
    10921092        dsc['study_course'] = brain.course_admitted
     
    11061106        student_object.invokeFactory('PaymentsFolder','payments')
    11071107        payments = getattr(student_object,'payments')
    1108         self.do_timing()
     1108        #self.do_timing()
    11091109        dpay = {}
    11101110        dpay['Title'] = 'Payments'
  • 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.