mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +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)
|
this.db(TABLE)
|
||||||
.whereRaw('created_at < now() - interval \'2 days\'')
|
.whereRaw('created_at < now() - interval \'2 days\'')
|
||||||
.del()
|
.del()
|
||||||
.then((res) => logger.info(`Deleted ${res} instances`));
|
.then((res) => res > 0 && logger.info(`Deleted ${res} instances`));
|
||||||
}
|
}
|
||||||
|
|
||||||
updateRow (details) {
|
updateRow (details) {
|
||||||
|
@ -24,7 +24,7 @@ class ClientMetricsDb {
|
|||||||
this.db(TABLE)
|
this.db(TABLE)
|
||||||
.whereRaw('created_at < now() - interval \'1 hour\'')
|
.whereRaw('created_at < now() - interval \'1 hour\'')
|
||||||
.del()
|
.del()
|
||||||
.then((res) => logger.info(`Deleted ${res} metrics`));
|
.then((res) => res > 0 && logger.info(`Deleted ${res} metrics`));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert new client metrics
|
// Insert new client metrics
|
||||||
|
Loading…
Reference in New Issue
Block a user