File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -179,20 +179,22 @@ function hflowRun(opts, runCb) {
179179 //console.log(JSON.stringify(recoveryData, null, 2));
180180 //process.exit(1);
181181
182- var engine = new Engine ( config , wflib , wfId , function ( err ) {
182+ var engine = new Engine ( config , wflib , wfId , async function ( err ) {
183183 // This represent custom plugin listening on event from available eventServer
184184 // engine.eventServer.on('trace.*', function(exec, args) {
185185 // console.log('Event captured: ' + exec + ' ' + args + ' job done');
186186 // });
187187
188- plugins . forEach ( function ( plugin ) {
189- let config = { } ;
190- if ( plugin . pgType == "scheduler" ) {
191- config . wfJson = wfJson ;
192- config . wfId = wfId ;
188+ await Promise . all (
189+ plugins . map ( function ( plugin ) {
190+ let config = { } ;
191+ if ( plugin . pgType == "scheduler" ) {
192+ config . wfJson = wfJson ;
193+ config . wfId = wfId ;
194+ }
195+ return plugin . init ( rcl , wflib , engine , config ) ;
193196 }
194- plugin . init ( rcl , wflib , engine , config ) ;
195- } ) ;
197+ ) ) ;
196198
197199 engine . syncCb = function ( ) {
198200 process . exit ( ) ;
You can’t perform that action at this time.
0 commit comments