mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-05-25 00:51:04 +00:00
userRule initialize
This commit is contained in:
parent
be4c86eb86
commit
08680a7fa7
@ -345,7 +345,27 @@ function setRules(newRule){
|
|||||||
}
|
}
|
||||||
|
|
||||||
userRule = util.merge(defaultRule,newRule);
|
userRule = util.merge(defaultRule,newRule);
|
||||||
'function' == typeof(userRule.summary) && console.log(userRule.summary());
|
|
||||||
|
var functions = [];
|
||||||
|
if('function' == typeof(userRule.init)){
|
||||||
|
functions.push(function(cb){
|
||||||
|
userRule.init(cb);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if('function' == typeof(userRule.summary)){
|
||||||
|
functions.push(function(cb){
|
||||||
|
userRule.summary();
|
||||||
|
cb(null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async.series(functions,function(errors,result){
|
||||||
|
if(!errors){
|
||||||
|
console.log(color.green('Anyproxy initialize finished, have a fun!'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//'function' == typeof(userRule.init) && console.log(userRule.init());
|
||||||
|
//'function' == typeof(userRule.summary) && console.log(userRule.summary());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user