molly-db 1.3.8 → 1.3.9
Sign up to get free protection for your applications and to get access to all the features.
- package/module/worker_handler.js +4 -4
- package/package.json +1 -1
package/module/worker_handler.js
CHANGED
@@ -15,8 +15,8 @@ function Exit(code){ console.log(`worker exit code: ${code}`); }
|
|
15
15
|
|
16
16
|
/*--────────────────────────────────────────────────────────────────────────────────────────────--*/
|
17
17
|
|
18
|
-
function
|
19
|
-
|
18
|
+
function saveInterval(data,db){
|
19
|
+
setInterval(() => {
|
20
20
|
if( db._update_ ){
|
21
21
|
db._update_ = false;
|
22
22
|
utils.saveAll(data,db);
|
@@ -35,9 +35,9 @@ module.exports = (arg)=>{ init( arg ).then((db)=>{
|
|
35
35
|
name: 'molly-db', protocol: 'HTTP',
|
36
36
|
port: arg.port, host: arg.host,
|
37
37
|
}));
|
38
|
-
});
|
38
|
+
}); saveInterval( arg, db );
|
39
39
|
|
40
40
|
}).catch((e)=>{ console.log(e) });
|
41
41
|
}
|
42
42
|
|
43
|
-
/*--────────────────────────────────────────────────────────────────────────────────────────────--*/
|
43
|
+
/*--────────────────────────────────────────────────────────────────────────────────────────────--*/
|
package/package.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"license": "MIT",
|
11
11
|
"main": "main.js",
|
12
12
|
"name": "molly-db",
|
13
|
-
"version": "1.3.
|
13
|
+
"version": "1.3.9",
|
14
14
|
"author": "bececrazy",
|
15
15
|
"description": "Molly-db is a free and open source library for nodejs that allow you create a lightweight encrypted database using Json files",
|
16
16
|
"keywords": [
|