implemented a test multi query query

This commit is contained in:
Manuel Simon Hirsig
2016-01-28 02:11:02 +01:00
parent bada64f629
commit dfeb0af3a1
4 changed files with 83 additions and 35 deletions
+7 -4
View File
@@ -114,11 +114,15 @@ end
function private.scan()
local start_query_index = state.params.start_query_index or 1
local next_query_index = state.params.next_query_index or function(query_index) return query_index + 1 end
state.query_index = state.query_index and state.query_index + 1 or 1
state.query_index = state.query_index and next_query_index(state.query_index) or start_query_index
if current_query() then
state.page = current_query().start_page
return private.process_query()
wait_for_callback{state.params.on_start_query or Aux.util.pass, state.query_index, function()
state.page = current_query().start_page
return private.process_query()
end }
else
local on_complete = state.params.on_complete
state = nil
@@ -128,7 +132,6 @@ function private.scan()
end
end
function private.process_query()
submit_query(function()