Changeset 9816 for main/waeup.kofa/trunk/src/waeup/kofa/utils
- Timestamp:
- 21 Dec 2012, 13:09:05 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py
r9797 r9816 28 28 import tempfile 29 29 import time 30 import zc.async.interfaces 30 31 from cStringIO import StringIO 31 32 from persistent.list import PersistentList … … 571 572 export_job, site, exporter_name, *args, **kwargs) 572 573 574 @property 575 def finished(self): 576 """A job is marked `finished` if it is completed. 577 578 Please note: a finished report job does not neccessarily 579 provide an IReport result. See meth:`failed`. 580 """ 581 return self.status == zc.async.interfaces.COMPLETED 582 583 @property 584 def failed(self): 585 """A report job is marked failed iff it is finished and the 586 result is None. 587 588 While a job is unfinished, the `failed` status is ``None``. 589 590 Failed jobs normally provide a `traceback` to examine reasons. 591 """ 592 if not self.finished: 593 return None 594 if getattr(self, 'result', None) is None: 595 return True 596 return False 597 573 598 class ExportJobContainer(object): 574 599 """A mix-in that provides functionality for asynchronous export jobs.
Note: See TracChangeset for help on using the changeset viewer.