refactoring
This commit is contained in:
+3
-3
@@ -12,7 +12,7 @@ value_cache = t
|
||||
|
||||
do
|
||||
local data
|
||||
function accessor.data()
|
||||
function property.data.get()
|
||||
if not data then
|
||||
local dataset = persistence.dataset
|
||||
data = dataset.history or t
|
||||
@@ -24,7 +24,7 @@ end
|
||||
|
||||
do
|
||||
local next_push = 0
|
||||
function accessor.next_push()
|
||||
function property.next_push.get()
|
||||
if time() > next_push then
|
||||
local date = date '*t'
|
||||
date.hour, date.min, date.sec = 24, 0, 0
|
||||
@@ -34,7 +34,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
function accessor.new_record()
|
||||
function property.new_record.get()
|
||||
return -object('next_push', next_push, 'data_points', t)
|
||||
end
|
||||
|
||||
|
||||
+2
-2
@@ -41,13 +41,13 @@ do
|
||||
call(on_complete)
|
||||
end
|
||||
|
||||
function accessor.state()
|
||||
function property.state.get()
|
||||
local _, state = next(filter(scan_states, function(state) return state.id == thread_id end))
|
||||
return state
|
||||
end
|
||||
end
|
||||
|
||||
function accessor.query() return state.params.queries[state.query_index] end
|
||||
function property.query.get() return state.params.queries[state.query_index] end
|
||||
|
||||
function wait_for_callback(...) temp=arg
|
||||
local send_signal, signal_received = signal()
|
||||
|
||||
Reference in New Issue
Block a user