module refactoring

This commit is contained in:
Manuel Simon Hirsig
2017-11-01 08:52:39 +01:00
committed by Simon Hirsig
parent 5e093306e6
commit 62ef2683f5
15 changed files with 69 additions and 97 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ end
do
local next_push = 0
function get_next_push()
function get.next_push()
if time() > next_push then
local date = date('*t')
date.hour, date.min, date.sec = 24, 0, 0
@@ -25,7 +25,7 @@ do
end
end
function get_new_record()
function get.new_record()
return temp-O('next_push', next_push, 'data_points', T)
end
+2 -2
View File
@@ -49,7 +49,7 @@ do
do (on_complete or nop)() end
end
function get_state()
function get.state()
for _, state in pairs(scan_states) do
if state.id == thread_id then
return state
@@ -58,7 +58,7 @@ do
end
end
function get_query()
function get.query()
return state.params.queries[state.query_index]
end