Use also{} to log info
This commit is contained in:
parent
0753ba3495
commit
fd4b56572d
|
@ -1679,27 +1679,24 @@ internal class RealmCryptoStore @Inject constructor(
|
||||||
// Only keep one week history
|
// Only keep one week history
|
||||||
realm.where<IncomingGossipingRequestEntity>()
|
realm.where<IncomingGossipingRequestEntity>()
|
||||||
.lessThan(IncomingGossipingRequestEntityFields.LOCAL_CREATION_TIMESTAMP, prevWeekTs)
|
.lessThan(IncomingGossipingRequestEntityFields.LOCAL_CREATION_TIMESTAMP, prevWeekTs)
|
||||||
.findAll().let {
|
.findAll()
|
||||||
Timber.i("## Crypto Clean up ${it.size} IncomingGossipingRequestEntity")
|
.also { Timber.i("## Crypto Clean up ${it.size} IncomingGossipingRequestEntity") }
|
||||||
it.deleteAllFromRealm()
|
.deleteAllFromRealm()
|
||||||
}
|
|
||||||
|
|
||||||
// Clean the cancelled ones?
|
// Clean the cancelled ones?
|
||||||
realm.where<OutgoingGossipingRequestEntity>()
|
realm.where<OutgoingGossipingRequestEntity>()
|
||||||
.equalTo(OutgoingGossipingRequestEntityFields.REQUEST_STATE_STR, OutgoingGossipingRequestState.CANCELLED.name)
|
.equalTo(OutgoingGossipingRequestEntityFields.REQUEST_STATE_STR, OutgoingGossipingRequestState.CANCELLED.name)
|
||||||
.equalTo(OutgoingGossipingRequestEntityFields.TYPE_STR, GossipRequestType.KEY.name)
|
.equalTo(OutgoingGossipingRequestEntityFields.TYPE_STR, GossipRequestType.KEY.name)
|
||||||
.findAll().let {
|
.findAll()
|
||||||
Timber.i("## Crypto Clean up ${it.size} OutgoingGossipingRequestEntity")
|
.also { Timber.i("## Crypto Clean up ${it.size} OutgoingGossipingRequestEntity") }
|
||||||
it.deleteAllFromRealm()
|
.deleteAllFromRealm()
|
||||||
}
|
|
||||||
|
|
||||||
// Only keep one week history
|
// Only keep one week history
|
||||||
realm.where<GossipingEventEntity>()
|
realm.where<GossipingEventEntity>()
|
||||||
.lessThan(GossipingEventEntityFields.AGE_LOCAL_TS, prevWeekTs)
|
.lessThan(GossipingEventEntityFields.AGE_LOCAL_TS, prevWeekTs)
|
||||||
.findAll().let {
|
.findAll()
|
||||||
Timber.i("## Crypto Clean up ${it.size} GossipingEventEntityFields")
|
.also { Timber.i("## Crypto Clean up ${it.size} GossipingEventEntityFields") }
|
||||||
it.deleteAllFromRealm()
|
.deleteAllFromRealm()
|
||||||
}
|
|
||||||
|
|
||||||
// Can we do something for WithHeldSessionEntity?
|
// Can we do something for WithHeldSessionEntity?
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue