Changeset 9739


Ignore:
Timestamp:
29 Nov 2012, 18:46:54 (12 years ago)
Author:
Henrik Bettermann
Message:

Put all information into a single logfile line. Otherwise we can't find the information via the UI.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/batchprocessing.txt

    r9589 r9739  
    153153    >>> browser.getControl(name='query').value = "zope.mgr"
    154154    >>> browser.getControl('Search').click()
    155     >>> 'zope.mgr: Batch processing finished: OK' in browser.contents
     155    >>> 'zope.mgr - processed' in browser.contents
    156156    True
    157     >>> 'Mode: create' in browser.contents
    158     True
    159 
    160     >>> browser.getControl(name='query').value = "finished"
    161     >>> browser.getControl('Search').click()
    162     >>> 'zope.mgr: Batch processing finished: OK' in browser.contents
    163     True
    164     >>> 'Mode: create' in browser.contents
    165     False
    166157
    167158
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py

    r9734 r9739  
    244244        if logger is None:
    245245            return
    246         status = 'OK'
    247         if warnings > 0:
    248             status = 'FAILED'
    249         logger.info("-" * 20)
    250         logger.info("%s: Batch processing finished: %s" % (user, status))
    251         logger.info("%s: Source: %s" % (user, path))
    252         logger.info("%s: Mode: %s" % (user, mode))
    253         logger.info("%s: User: %s" % (user, user))
    254         if warnings > 0:
    255             logger.info("%s: Failed datasets: %s" % (
    256                     user, os.path.basename(fail_path)))
    257         logger.info("%s: Processing time: %0.3f s (%0.4f s/item)" % (
    258                 user, timedelta, timedelta/(num or 1)))
    259         logger.info("%s: Processed: %s lines (%s successful/ %s failed)" % (
    260                 user, num, num - warnings, warnings
    261                 ))
    262         logger.info("-" * 20)
     246        logger.info(
     247            "processed: %s, %s mode, %s lines (%s successful/ %s failed), "
     248            "%0.3f s (%0.4f s/item)" % (
     249            path, mode, num, num - warnings, warnings,
     250            timedelta, timedelta/(num or 1)))
    263251        return
    264252
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.txt

    r9706 r9739  
    277277
    278278    >>> print open('stoneville.log').read()
    279     --------------------
    280     Bob: Batch processing finished: OK
    281     Bob: Source: newcomers.csv
    282     Bob: Mode: create
    283     Bob: User: Bob
    284     Bob: Processing time: ... s (... s/item)
    285     Bob: Processed: 4 lines (4 successful/ 0 failed)
    286     --------------------
     279    processed: newcomers.csv, create mode, 4 lines (4 successful/ 0 failed), ... s (... s/item)
     280
    287281
    288282We cleanup the temporay dir created by doImport():
     
    306300
    307301    >>> print open('stoneville.log').read()
    308     --------------------
    309     ...
    310     --------------------
    311     Bob: Batch processing finished: FAILED
    312     Bob: Source: newcomers.csv
    313     Bob: Mode: create
    314     Bob: User: Bob
    315     Bob: Failed datasets: newcomers.pending.csv
    316     Bob: Processing time: ... s (... s/item)
    317     Bob: Processed: 4 lines (0 successful/ 4 failed)
    318     --------------------
     302    processed: newcomers.csv, create mode, 4 lines (4 successful/ 0 failed), ... s (... s/item)
     303    processed: newcomers.csv, create mode, 4 lines (0 successful/ 4 failed), ... s (... s/item)
     304
    319305
    320306This time a new file was created, which keeps all the rows we could not
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_batching.py

    r9726 r9739  
    218218        """
    219219           >>> print log_contents
    220            --------------------
    221            Bob: Batch processing finished: OK
    222            Bob: Source: /.../newcomers.csv
    223            Bob: Mode: create
    224            Bob: User: Bob
    225            Bob: Processing time: ... s (... s/item)
    226            Bob: Processed: 4 lines (4 successful/ 0 failed)
    227            --------------------
     220           processed: /.../newcomers.csv, create mode, 4 lines (4 successful/ 0 failed), ... s (... s/item)
    228221
    229222        """
Note: See TracChangeset for help on using the changeset viewer.