Changeset 9718
- Timestamp:
- 24 Nov 2012, 17:19:04 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
r9671 r9718 1164 1164 """A component that contains (maybe virtually) export jobs. 1165 1165 """ 1166 def start_export_job(exporter_name, user_id ):1166 def start_export_job(exporter_name, user_id, *args, **kwargs): 1167 1167 """Start asynchronous export job. 1168 1168 … … 1170 1170 1171 1171 `user_id` is the ID of the user that triggers the export. 1172 1173 `args` positional arguments passed to the export job created. 1174 1175 `kwargs` keyword arguments passed to the export job. 1172 1176 1173 1177 The job_id is stored along with exporter name and user id in a -
main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py
r9706 r9718 560 560 grok.implements(IExportJob) 561 561 562 def __init__(self, site, exporter_name ):562 def __init__(self, site, exporter_name, *args, **kwargs): 563 563 super(AsyncExportJob, self).__init__( 564 export_job, site, exporter_name )564 export_job, site, exporter_name, *args, **kwargs) 565 565 566 566 class ExportJobContainer(object): … … 570 570 running_exports = PersistentList() 571 571 572 def start_export_job(self, exporter_name, user_id ):572 def start_export_job(self, exporter_name, user_id, *args, **kwargs): 573 573 """Start asynchronous export job. 574 574 … … 580 580 persistent list. 581 581 582 The method supports additional positional and keyword 583 arguments, which are passed as-is to the respective 584 :class:`AsyncExportJob`. 585 582 586 Returns the job ID of the job started. 583 587 """ 584 588 site = grok.getSite() 585 589 manager = getUtility(IJobManager) 586 job = AsyncExportJob(site, exporter_name )590 job = AsyncExportJob(site, exporter_name, *args, **kwargs) 587 591 job_id = manager.put(job) 588 592 # Make sure that the persisted list is stored in ZODB
Note: See TracChangeset for help on using the changeset viewer.