@@ -662,22 +662,20 @@ define([
662662 . catch ( err => this . logger . error ( `Could not get op info for ${ JSON . stringify ( opId ) } : ${ err } ` ) ) ;
663663 } ;
664664
665- ExecuteJob . prototype . onDistOperationComplete = function ( node , result ) {
665+ ExecuteJob . prototype . onDistOperationComplete = async function ( node , result ) {
666666 const opName = this . getAttribute ( node , 'name' ) ;
667+ const resultTypes = await this . getResultTypes ( result ) ;
667668 let nodeId = this . core . getPath ( node ) ,
668669 outputMap = { } ,
669- resultTypes ,
670670 outputs ;
671671
672+
672673 // Match the output names to the actual nodes
673674 // Create an array of [name, node]
674675 // For now, just match by type. Later we may use ports for input/outputs
675676 // Store the results in the outgoing ports
676- return this . getResultTypes ( result )
677- . then ( types => {
678- resultTypes = types ;
679- return this . getOutputs ( node ) ;
680- } )
677+
678+ return this . getOutputs ( node )
681679 . then ( outputPorts => {
682680 outputs = outputPorts . map ( tuple => [ tuple [ 0 ] , tuple [ 2 ] ] ) ;
683681 outputs . forEach ( output => outputMap [ output [ 0 ] ] = output [ 1 ] ) ;
@@ -716,8 +714,9 @@ define([
716714 } ;
717715
718716 ExecuteJob . prototype . getResultTypes = async function ( result ) {
719- const artifactHash = result . resultHashes [ 'result-types' ] ;
720- return await this . getContentHashSafe ( artifactHash , 'result-types.json' , ERROR . NO_TYPES_FILE ) ;
717+ const mdHash = result . resultHashes [ 'result-types' ] ;
718+ const hash = await this . getContentHashSafe ( mdHash , 'result-types.json' , ERROR . NO_TYPES_FILE ) ;
719+ return await this . blobClient . getObjectAsJSON ( hash ) ;
721720 } ;
722721
723722 ExecuteJob . prototype . getContentHashSafe = async function ( artifactHash , fileName , msg ) {
0 commit comments