refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-27 14:14:16 +02:00
parent 22c3d0436e
commit 93203bd3e1
8 changed files with 26 additions and 31 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ value_cache = t
do
local cache
function data.get()
function private.data.get()
if not cache then
local dataset = persistence.dataset
cache = dataset.history or t
@@ -18,7 +18,7 @@ end
do
local time = 0
function next_push.get()
function private.next_push.get()
if time() > time then
local date = date '*t'
date.hour, date.min, date.sec = 24, 0, 0
@@ -28,7 +28,7 @@ do
end
end
function new_record.get()
function private.new_record.get()
return -object('next_push', next_push, 'data_points', t)
end
+2 -2
View File
@@ -37,13 +37,13 @@ do
call(on_complete)
end
function state.get()
function private.state.get()
local _, state = next(filter(scan_states, function(state) return state.id == thread_id end))
return state
end
end
function query.get() return state.params.queries[state.query_index] end
function private.query.get() return state.params.queries[state.query_index] end
function wait_for_callback(...) temp=arg
local send_signal, signal_received = signal()