Comparing version 1.31.12 to 1.31.13
@@ -19,3 +19,3 @@ /* | ||
* | ||
* - Old records are deleted when DB file reaches 50 MB (only last hour is kept) | ||
* - Old records are deleted when DB file reaches 100 MB (records older than 12 hours) | ||
* @type {request|exports} | ||
@@ -340,4 +340,4 @@ */ | ||
if (!err) { | ||
if (fsStat.size >= (config.maxDbSize || 1024 * 1024 * 10)) { | ||
db.remove({ts: {$lt: new Date().getTime() - (1000 * 60 * 60)}}, function (err, numRemoved) { | ||
if (fsStat.size >= (config.maxDbSize || 1024 * 1024 * 100)) { | ||
db.remove({ts: {$lt: new Date().getTime() - (1000 * 60 * 60 * 12)}}, function (err, numRemoved) { | ||
try { | ||
@@ -344,0 +344,0 @@ if (err) { |
@@ -54,3 +54,3 @@ /* | ||
}, | ||
maxDbSize: Number(process.env.SPM_MAX_DB_SIZE) || 1024 * 1024 * 24, | ||
maxDbSize: Number(process.env.SPM_MAX_DB_SIZE) || 1024 * 1024 * 100, | ||
agentsToLoad: [], | ||
@@ -57,0 +57,0 @@ maxDataPoints: Number(process.env.SPM_MAX_DATAPOINTS) || 90, |
{ | ||
"name": "spm-agent", | ||
"version": "1.31.12", | ||
"version": "1.31.13", | ||
"description": "Node.js agent framework for SPM by Sematext", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58829
13