Skip to content

Commit

Permalink
Ensure result is available
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardobl committed May 23, 2024
1 parent a467a4f commit c796168
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/runtime/binds/JobHostFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ export default class JobHostFunctions extends HostFunctionsNamespace {
async (mng, pluginPath, pluginId, currentJob, cp, jobIdOff: bigint, nExpectedResultsB: bigint, maxWaitTimeB: bigint) => {
const jobId = cp.read(jobIdOff).text() ;
const logPassthrough = true;
const expectedResults = Number(nExpectedResultsB);
const maxWaitTime = Number(maxWaitTimeB);
const expectedResults = Number(nExpectedResultsB)||1
const maxWaitTime = Number(maxWaitTimeB)||1000*60*2;


const trackedLogs = [];
Expand All @@ -142,7 +142,7 @@ export default class JobHostFunctions extends HostFunctionsNamespace {
}
}
}
if (state.status == JobStatus.SUCCESS) successes++;
if (state.status == JobStatus.SUCCESS && state.result.timestamp) successes++;
if(successes >= expectedResults){
return BigInt(1);
}
Expand Down

0 comments on commit c796168

Please sign in to comment.