minor changes

This commit is contained in:
Nikolai Tschacher
2019-01-27 22:11:41 +01:00
parent a20b6c79a9
commit c5e3e84e1d
3 changed files with 5 additions and 4 deletions

View File

@ -20,12 +20,13 @@ function write_results(fname, data) {
});
}
module.exports.handler = async function handler (config, context, callback) {
module.exports.handler = async function handler (event, context, callback) {
config = event;
pluggable = null;
if (config.custom_func && fs.existsSync(config.custom_func)) {
try {
Pluggable = require(config.custom_func);
pluggable = new Pluggable();
pluggable = new Pluggable({config:config});
} catch (exception) {
console.error(exception);
}