mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-18 23:05:26 +02:00
fix: Avoid unnecessary call if earlierCounter is negative
This commit is contained in:
parent
69b76a7640
commit
b707681a63
@ -73,9 +73,14 @@ abstract class IntervalRecorderService<I, B : BatchesFolder> :
|
||||
val timeMultiplier = settings.maxDuration / settings.intervalDuration
|
||||
val earliestCounter = counter - timeMultiplier
|
||||
|
||||
if (earliestCounter <= 0) {
|
||||
return
|
||||
}
|
||||
|
||||
batchesFolder.deleteOldRecordings(earliestCounter)
|
||||
}
|
||||
|
||||
// TODO
|
||||
abstract class Settings(
|
||||
open val maxDuration: Long,
|
||||
open val intervalDuration: Long,
|
||||
|
Loading…
x
Reference in New Issue
Block a user