Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Mint de Wit <[email protected]>
  • Loading branch information
nytamin and mint-dewit authored May 7, 2024
1 parent a237fea commit c971418
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export class TrackedWorkerAgents {
const cost = await workerAgent.api.getCostForExpectation(trackedExp.exp)

if (cost.cost !== null) {
// null means that the cost is "infinite"
workerCosts.push({
worker: workerAgent.api,
id: workerId,
Expand Down
1 change: 1 addition & 0 deletions shared/packages/worker/src/workerAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ export class WorkerAgent {
}
let resultingCost: Cost = systemStartCost
for (const job of this.currentJobs) {
// null means that the cost is "infinite"
if (resultingCost === null) break

if (job.cost.cost === null) resultingCost = null
Expand Down

0 comments on commit c971418

Please sign in to comment.