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:
parent
7513c045c1
commit
77858218cf
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user