1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00

only log if num of cleaned is above 0

This commit is contained in:
sveisvei 2016-12-04 22:12:35 +01:00
parent 7513c045c1
commit 77858218cf
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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