bugfix on ML model refresh during online analysis

This commit is contained in:
Alexandre Storelli 2019-03-27 23:40:46 +01:00
parent 322c07bb20
commit 4b3f331a64
3 changed files with 14 additions and 3 deletions

8
package-lock.json generated
View File

@ -358,6 +358,7 @@
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"dev": true,
"requires": {
"sprintf-js": "~1.0.2"
}
@ -1744,7 +1745,8 @@
"esprima": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
"dev": true
},
"event-lite": {
"version": "0.1.2",
@ -2775,6 +2777,7 @@
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz",
"integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
@ -4668,7 +4671,8 @@
"sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"dev": true
},
"sqlite3": {
"version": "4.0.6",

View File

@ -306,8 +306,9 @@ class Predictor {
if (this.mlPredictor) {
this.decoder.stdout.unpipe(this.mlPredictor);
this.mlPredictor.destroy();
delete this.mlPredictor;
}
if (this.config.enablePredictorMl && !this.mlPredictor) {
if (this.config.enablePredictorMl) {
this.mlPredictor = new MlPredictor({
country: this.country,
name: this.name,

View File

@ -178,6 +178,12 @@ if (cluster.isMaster) {
}
}
});
it("should refresh ML model when requested");
it("should refresh hotlist db when requested");
it("should refresh metadata parser when requested");
});
} else {