performance change
This commit is contained in:
+2
-2
@@ -34,11 +34,11 @@ do
|
||||
end
|
||||
|
||||
function get_new_record()
|
||||
return O('next_push', next_push, 'data_points', T)
|
||||
return temp-O('next_push', next_push, 'data_points', T)
|
||||
end
|
||||
|
||||
function read_record(item_key)
|
||||
local record = temp-(data[item_key] and persistence.read(history_schema, data[item_key]) or new_record)
|
||||
local record = data[item_key] and persistence.read(history_schema, data[item_key]) or new_record
|
||||
if record.next_push <= time() then
|
||||
push_record(record)
|
||||
write_record(item_key, record)
|
||||
|
||||
Reference in New Issue
Block a user