liquid_feedback_frontend

annotate 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
rev   line source
bsw@1158 1 if not config.fork then
bsw@1158 2 config.fork = {}
bsw@1158 3 end
bsw@1158 4
bsw@1158 5 if not config.fork.pre then
bsw@1158 6 config.fork.pre = 4
bsw@1158 7 end
bsw@1158 8
bsw@1158 9 if not config.fork.max then
bsw@1158 10 config.fork.max = 8
bsw@1158 11 end
bsw@1158 12
bsw@1158 13 if not config.fork.delay then
bsw@1158 14 config.fork.delay = 1
bsw@1158 15 end
bsw@1158 16
bsw@1158 17 if not config.port then
bsw@1158 18 config.port = 8080
bsw@1158 19 end
bsw@1158 20
bsw@1158 21 if config.localhost == nil then
bsw@1158 22 config.localhost = true
bsw@1158 23 end
bsw@1158 24
bsw@1158 25 listen{
bsw@1158 26 { proto = "tcp4", port = config.port, localhost = true },
bsw@1158 27 { proto = "interval", delay = 5, handler = function()
bsw@1158 28 Event:send_pending_notifications()
bsw@1158 29 end },
bsw@1158 30 pre_fork = config.fork.pre,
bsw@1158 31 max_fork = config.fork.max,
bsw@1158 32 fork_delay = config.fork.delay
bsw@1158 33 }
bsw@1158 34
bsw@1158 35 execute.inner()
bsw@1158 36

Impressum / About Us