Changeset 4900 for waeup/trunk
- Timestamp:
- 27 Jan 2010, 12:10:03 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/trunk/src/waeup/utils/batching.py
r4894 r4900 9 9 import os 10 10 import sys 11 import tempfile 11 12 import time 12 13 from zope.component import createObject … … 203 204 logger.info("%s: User: %s" % (user, user)) 204 205 if warnings > 0: 205 logger.info("%s: Failed datasets: %s" % (user, fail_path)) 206 logger.info("%s: Failed datasets: %s" % ( 207 user, os.path.basename(fail_path))) 206 208 logger.info("%s: Processing time: %0.3f s (%0.4f s/item)" % ( 207 209 user, timedelta, timedelta/(num or 1))) … … 234 236 reader = csv.DictReader(open(path, 'rb')) 235 237 238 temp_dir = tempfile.mkdtemp() 239 236 240 (base, ext) = os.path.splitext(path) 237 failed_path = "%s.pending%s" % (base, ext)241 failed_path = os.path.join(temp_dir, "%s.pending%s" % (base, ext)) 238 242 failed_headers = [x for x in mapping.values()] 239 243 failed_headers.append('--ERRORS--') … … 242 246 failed_writer.writerow(dict([(x,x) for x in failed_headers])) 243 247 244 finished_path = "%s.finished%s" % (base, ext)248 finished_path = os.path.join(temp_dir, "%s.finished%s" % (base, ext)) 245 249 finished_headers = [x for x in mapping.values()] 246 250 finished_writer = csv.DictWriter(open(finished_path, 'wb'),
Note: See TracChangeset for help on using the changeset viewer.