bsw@1158: if not config.fork then bsw@1158: config.fork = {} bsw@1158: end bsw@1158: bsw@1158: if not config.fork.pre then bsw@1158: config.fork.pre = 4 bsw@1158: end bsw@1158: bsw@1158: if not config.fork.max then bsw@1158: config.fork.max = 8 bsw@1158: end bsw@1158: bsw@1158: if not config.fork.delay then bsw@1158: config.fork.delay = 1 bsw@1158: end bsw@1158: bsw@1158: if not config.port then bsw@1158: config.port = 8080 bsw@1158: end bsw@1158: bsw@1158: if config.localhost == nil then bsw@1158: config.localhost = true bsw@1158: end bsw@1158: bsw@1158: listen{ bsw@1158: { proto = "tcp4", port = config.port, localhost = true }, bsw@1158: { proto = "interval", delay = 5, handler = function() bsw@1158: Event:send_pending_notifications() bsw@1158: end }, bsw@1158: pre_fork = config.fork.pre, bsw@1158: max_fork = config.fork.max, bsw@1158: fork_delay = config.fork.delay bsw@1158: } bsw@1158: bsw@1158: execute.inner() bsw@1158: