From 23bc8f8b1d155077bab655bd2cb8088fb5d25e5f Mon Sep 17 00:00:00 2001 From: Grzegorz Godlewski Date: Tue, 3 Sep 2024 13:03:27 +0200 Subject: [PATCH] fix: factored thread count for hourly cost estimation when doing market scan --- src/market/market.command.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/market/market.command.ts b/src/market/market.command.ts index 836cb99..cecbc7a 100644 --- a/src/market/market.command.ts +++ b/src/market/market.command.ts @@ -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; };