diff --git a/lib/db/client-instance-store.js b/lib/db/client-instance-store.js index 6459f0e8e4..5e946b3c15 100644 --- a/lib/db/client-instance-store.js +++ b/lib/db/client-instance-store.js @@ -30,7 +30,7 @@ class ClientInstanceStore { this.db(TABLE) .whereRaw('created_at < now() - interval \'2 days\'') .del() - .then((res) => logger.info(`Deleted ${res} instances`)); + .then((res) => res > 0 && logger.info(`Deleted ${res} instances`)); } updateRow (details) { diff --git a/lib/db/client-metrics-db.js b/lib/db/client-metrics-db.js index de6a887dd8..b555606d06 100644 --- a/lib/db/client-metrics-db.js +++ b/lib/db/client-metrics-db.js @@ -24,7 +24,7 @@ class ClientMetricsDb { this.db(TABLE) .whereRaw('created_at < now() - interval \'1 hour\'') .del() - .then((res) => logger.info(`Deleted ${res} metrics`)); + .then((res) => res > 0 && logger.info(`Deleted ${res} metrics`)); } // Insert new client metrics