Remove extranious prints
Remove extra print statements that were cluttering up stdout
This commit is contained in:
parent
41aecc8bc1
commit
8a60675236
|
@ -46,7 +46,6 @@ end
|
||||||
|
|
||||||
--Render a page, with cacheing. If you need to dirty a cache, call dirty_cache()
|
--Render a page, with cacheing. If you need to dirty a cache, call dirty_cache()
|
||||||
function ret.render(pagename,callback)
|
function ret.render(pagename,callback)
|
||||||
print("Running render...")
|
|
||||||
stmnt_cache:bind_names{path=pagename}
|
stmnt_cache:bind_names{path=pagename}
|
||||||
local err = util.do_sql(stmnt_cache)
|
local err = util.do_sql(stmnt_cache)
|
||||||
if err == sql.DONE then
|
if err == sql.DONE then
|
||||||
|
@ -61,9 +60,7 @@ function ret.render(pagename,callback)
|
||||||
error("Failed to check cache for page " .. pagename)
|
error("Failed to check cache for page " .. pagename)
|
||||||
end
|
end
|
||||||
--We didn't have the paged cached, render it
|
--We didn't have the paged cached, render it
|
||||||
print("Cache miss, running function")
|
|
||||||
local text = callback()
|
local text = callback()
|
||||||
print("Saving data...")
|
|
||||||
--And save the data back into the cache
|
--And save the data back into the cache
|
||||||
stmnt_insert_cache:bind_names{
|
stmnt_insert_cache:bind_names{
|
||||||
path=pagename,
|
path=pagename,
|
||||||
|
@ -74,7 +71,6 @@ function ret.render(pagename,callback)
|
||||||
error("Failed to update cache for page " .. pagename)
|
error("Failed to update cache for page " .. pagename)
|
||||||
end
|
end
|
||||||
stmnt_insert_cache:reset()
|
stmnt_insert_cache:reset()
|
||||||
print("returning text from cache.render:",text)
|
|
||||||
return text
|
return text
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,6 @@ local grammar = P{
|
||||||
marked = V"spoiler" + V"bold" + V"italic" + V"underline" + V"heading" + V"strike" + V"spoiler2" + V"code",
|
marked = V"spoiler" + V"bold" + V"italic" + V"underline" + V"heading" + V"strike" + V"spoiler2" + V"code",
|
||||||
plainline = (V"marked" + word)^0,
|
plainline = (V"marked" + word)^0,
|
||||||
line = Cs(V"greentext" + V"pinktext" + V"plainline" + P"") * P"\n" / function(a)
|
line = Cs(V"greentext" + V"pinktext" + V"plainline" + P"") * P"\n" / function(a)
|
||||||
print("matched line:","\"" .. a .. "\"")
|
|
||||||
if a == "\r" then
|
if a == "\r" then
|
||||||
return "<br/>"
|
return "<br/>"
|
||||||
else
|
else
|
||||||
|
|
|
@ -80,16 +80,13 @@ int
|
||||||
do_lua(struct http_request *req, const char *name){
|
do_lua(struct http_request *req, const char *name){
|
||||||
printf("About to do lua %s\n",name);
|
printf("About to do lua %s\n",name);
|
||||||
lua_pushcfunction(L,errhandeler);
|
lua_pushcfunction(L,errhandeler);
|
||||||
printf("Pushed errhandler function\n");
|
|
||||||
lua_getglobal(L,name);//err(),name()
|
lua_getglobal(L,name);//err(),name()
|
||||||
if(!lua_isfunction(L,-1)){
|
if(!lua_isfunction(L,-1)){
|
||||||
printf("Could not find a method named %s\n",name);
|
printf("Could not find a method named %s\n",name);
|
||||||
lua_pop(L,2);//
|
lua_pop(L,2);//
|
||||||
return (KORE_RESULT_OK);
|
return (KORE_RESULT_OK);
|
||||||
}
|
}
|
||||||
printf("About to push light userdata: %p\n",(void*)req);
|
|
||||||
lua_pushlightuserdata(L,req);//err,name(),ud_req
|
lua_pushlightuserdata(L,req);//err,name(),ud_req
|
||||||
printf("About to pcall\n");
|
|
||||||
int err = lua_pcall(L,1,0,-3);
|
int err = lua_pcall(L,1,0,-3);
|
||||||
if(err != LUA_OK){
|
if(err != LUA_OK){
|
||||||
size_t retlen;
|
size_t retlen;
|
||||||
|
|
Loading…
Reference in New Issue