@@ -59,6 +59,7 @@ async function processProtectedData({
5959 result . success = false ;
6060 result . error = e . message ;
6161 }
62+ console . log ( `Protected data ${ index } processed:` , result ) ;
6263 return result ;
6364}
6465
@@ -96,6 +97,7 @@ async function start() {
9697
9798 // Process multiple protected data
9899 if ( bulkSize > 0 ) {
100+ console . log ( `Processing ${ bulkSize } protected data...` ) ;
99101 const processPromises = new Array ( bulkSize ) . fill ( null ) . map ( ( _ , index ) =>
100102 processProtectedData ( {
101103 index : index + 1 ,
@@ -121,6 +123,7 @@ async function start() {
121123 } ) ) ,
122124 } ;
123125 } else {
126+ console . log ( 'Processing single protected data...' ) ;
124127 const { protectedData, success, error } = await processProtectedData ( {
125128 index : 0 ,
126129 IEXEC_IN ,
@@ -130,9 +133,11 @@ async function start() {
130133 result = { protectedData, success, error } ;
131134 }
132135 } catch ( e ) {
136+ console . error ( 'Something went wrong:' , e . message ) ;
133137 result = { success : false , error : e . message } ;
134138 }
135139
140+ console . log ( 'Writing results:' , JSON . stringify ( result ) ) ;
136141 await fs . writeFile (
137142 `${ workerEnv . IEXEC_OUT } /result.json` ,
138143 JSON . stringify ( result , null , 2 )
0 commit comments