cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robby Pelssers <Robby.Pelss...@nxp.com>
Subject does flowscript also support sht like setTimeout and setInterval ??
Date Thu, 24 May 2012 12:56:18 GMT
Hi guys,

I was bulk processing DITA maps and topics from flowscript and noticed that following code
is executed parallel.  So basically the cocoon.processPipelineTo returns immediately so it
seems.  This results in max sessions reached to XMLDb and I run into an exception.  Just checking
what is best way to put some delay in the execution.

function generateValuePropositions() {
   var id_collection = Collection.fromArray(getJson('getCommaSeparatedBasicTypeIds'));
   print('Starting generation of ' + id_collection.getLength() + ' value propositions!!');
   id_collection.forEach(
       /** we write the map and topics for each id **/
       function(id){
           cocoon.processPipelineTo("write-map-and-topics/" + id, null, new Packages.java.io.ByteArrayOutputStream());
       }
   );
}

Kind regards,
Robby

Mime
View raw message