Skip to content

Commit

Permalink
fix: factored thread count for hourly cost estimation when doing mark…
Browse files Browse the repository at this point in the history
…et scan
  • Loading branch information
grisha87 committed Sep 3, 2024
1 parent 482875b commit 23bc8f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/market/market.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ marketCommand
if (!maxHourPrice) {
return true;
}
const hourlyPrice = offer.pricing.start + offer.pricing.cpuSec * 3600 + offer.pricing.envSec * 3600;

const hourlyPrice =
offer.pricing.start + offer.pricing.cpuSec * 3600 * offer.cpuThreads + offer.pricing.envSec * 3600;

return hourlyPrice <= maxHourPrice;
};

Expand Down

0 comments on commit 23bc8f8

Please sign in to comment.