refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-25 01:32:55 +02:00
parent a4e3068557
commit 9adbe7f2ca
11 changed files with 53 additions and 43 deletions
+3 -3
View File
@@ -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
View File
@@ -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()