comparison mod_s2s_reload_newcomponent/mod_s2s_reload_newcomponent.lua @ 214:7487f8b47662

mod_s2s_reload_newcomponent: fix debug logs
author Gaurav <gauravsri@gmail.com>
date Fri, 16 Jul 2010 01:25:40 -0700
parents 89051a926f74
children fe5bb7b13a59
comparison
equal deleted inserted replaced
213:89051a926f74 214:7487f8b47662
2 local config = require "core.configmanager"; 2 local config = require "core.configmanager";
3 3
4 module.host = "*"; 4 module.host = "*";
5 5
6 local function reload_components() 6 local function reload_components()
7 module:log ("debug", "reload_components");
8
9 local defined_hosts = config.getconfig(); 7 local defined_hosts = config.getconfig();
10 8
11 for host in pairs(defined_hosts) do 9 for host in pairs(defined_hosts) do
12 module:log ("debug", "found host %s", host);
13 if (not hosts[host] and host ~= "*") then 10 if (not hosts[host] and host ~= "*") then
14 module:log ("debug", "found new host %s", host); 11 module:log ("debug", "loading new component %s", host);
15 modulemanager.load(host, configmanager.get(host, "core", "component_module")); 12 modulemanager.load(host, configmanager.get(host, "core", "component_module"));
16 end 13 end
17 end; 14 end;
18 15
19 return; 16 return;