some history changes
This commit is contained in:
+3
-4
@@ -4,7 +4,7 @@ Aux.history = public
|
|||||||
private.PUSH_INTERVAL = 57600
|
private.PUSH_INTERVAL = 57600
|
||||||
|
|
||||||
function private.new_record()
|
function private.new_record()
|
||||||
return { next_push = time() + private.PUSH_INTERVAL, market_values = {}, max_bids = {} }
|
return { next_push = time() + private.PUSH_INTERVAL, market_values = {} }
|
||||||
end
|
end
|
||||||
|
|
||||||
function private.load_data()
|
function private.load_data()
|
||||||
@@ -98,9 +98,7 @@ function private.market_value(item_record)
|
|||||||
estimate = item_record.daily_max_bid
|
estimate = item_record.daily_max_bid
|
||||||
end
|
end
|
||||||
|
|
||||||
if item_record.daily_max_price and item_record.daily_max_price > estimate then
|
estimate = min(ceil(estimate * 1.15), item_record.daily_max_price)
|
||||||
estimate = min(ceil(estimate * 1.15), item_record.daily_max_price)
|
|
||||||
end
|
|
||||||
|
|
||||||
return estimate
|
return estimate
|
||||||
end
|
end
|
||||||
@@ -121,6 +119,7 @@ function private.median(list)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function private.push_record(item_record)
|
function private.push_record(item_record)
|
||||||
|
|
||||||
local market_value = private.market_value(item_record)
|
local market_value = private.market_value(item_record)
|
||||||
if market_value then
|
if market_value then
|
||||||
tinsert(item_record.market_values, market_value)
|
tinsert(item_record.market_values, market_value)
|
||||||
|
|||||||
Reference in New Issue
Block a user