mirror of
https://github.com/Unleash/unleash.git
synced 2025-03-27 00:19:39 +01:00
only log if num of cleaned is above 0
This commit is contained in:
parent
b5b846835b
commit
a1303f4c42
@ -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