- Timestamp:
- 9 Nov 2012, 07:53:05 (12 years ago)
- 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
r9420 r9589 641 641 642 642 >>> browser.open('http://localhost/app/datacenter/processed') 643 >>> '<a href="download?filename=finished/certificates_zope.mgr.c sv">' in browser.contents643 >>> '<a href="download?filename=finished/certificates_zope.mgr.create.finished.csv">' in browser.contents 644 644 True 645 645 -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterfinishedpage.pt
r9195 r9589 1 1 <table i18n:domain="waeup.kofa" class="display dataTableFiles"> 2 <p i18n:translate=""> 3 Find below the last 4 <span tal:content="view/context/max_files" i18n:name="count">50</span> 5 imports. The files contain the imported datasets. 6 </p> 2 7 <thead> 3 8 <tr> -
main/waeup.kofa/trunk/src/waeup/kofa/datacenter.py
r9340 r9589 22 22 """ 23 23 import os 24 import fnmatch 24 25 import re 25 26 import shutil … … 46 47 logger_filename = 'datacenter.log' 47 48 49 max_files = 100 50 48 51 def __init__(self, *args, **kw): 49 52 super(DataCenter, self).__init__(*args, **kw) … … 97 100 if not os.path.exists(finished_dir): 98 101 return result 99 for filename in sorted(os.listdir(finished_dir)): 102 mtime = lambda f: os.stat(os.path.join(finished_dir, f)).st_mtime 103 finished_files = [f for f in 104 sorted(os.listdir(finished_dir), key=mtime, reverse=True) 105 if fnmatch.fnmatch(f, '*.finished.csv')] 106 for filename in finished_files[:self.max_files]: 100 107 fullpath = os.path.join(finished_dir, filename) 101 108 if not os.path.isfile(fullpath): -
main/waeup.kofa/trunk/src/waeup/kofa/datacenter.txt
r9023 r9589 276 276 277 277 >>> mydatacenter.getFinishedFiles() 278 [<waeup.kofa.datacenter.DataCenterFile object at ...> , <waeup.kofa.datacenter.DataCenterFile object at ...>]278 [<waeup.kofa.datacenter.DataCenterFile object at ...>] 279 279 280 280 >>> datafile = mydatacenter.getFinishedFiles()[0]
Note: See TracChangeset for help on using the changeset viewer.