liquid_feedback_frontend

diff app/main/_prefork/10_init.lua @ 1158:e9f6ae14bc72

Updated event notifications and moved code from config to prefork initializer
author bsw
date Tue Mar 24 11:50:08 2015 +0100 (2015-03-24)
parents
children 51a17a0e26e9 93b32111526f
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/_prefork/10_init.lua	Tue Mar 24 11:50:08 2015 +0100
     1.3 @@ -0,0 +1,36 @@
     1.4 +if not config.fork then
     1.5 +  config.fork = {}
     1.6 +end
     1.7 +
     1.8 +if not config.fork.pre then
     1.9 +  config.fork.pre = 4
    1.10 +end
    1.11 +
    1.12 +if not config.fork.max then
    1.13 +  config.fork.max = 8
    1.14 +end
    1.15 +
    1.16 +if not config.fork.delay then
    1.17 +  config.fork.delay = 1
    1.18 +end
    1.19 +
    1.20 +if not config.port then
    1.21 +  config.port = 8080
    1.22 +end
    1.23 +
    1.24 +if config.localhost == nil then
    1.25 +  config.localhost = true
    1.26 +end
    1.27 +
    1.28 +listen{
    1.29 + { proto = "tcp4", port = config.port, localhost = true },
    1.30 + { proto = "interval", delay = 5, handler = function() 
    1.31 +    Event:send_pending_notifications()
    1.32 + end },
    1.33 + pre_fork = config.fork.pre,
    1.34 + max_fork = config.fork.max,
    1.35 + fork_delay = config.fork.delay
    1.36 +}
    1.37 +
    1.38 +execute.inner()
    1.39 +

Impressum / About Us