mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
Lines
This commit is contained in:
parent
52141b825c
commit
97ce2bdc3a
1 changed files with 0 additions and 2 deletions
|
|
@ -121,10 +121,8 @@ class Audits extends Action
|
|||
|
||||
// Check if we should process the batch by checking both for the batch size and the elapsed time
|
||||
$batchSize = $this->getBatchSize();
|
||||
|
||||
$logCount = array_reduce($this->logs, fn (int $current, $logs) => $current + count($logs['logs']), 0);
|
||||
$shouldProcessBatch = $logCount >= $batchSize;
|
||||
|
||||
if (!$shouldProcessBatch && $logCount > 0) {
|
||||
$shouldProcessBatch = (\time() - $this->lastTriggeredTime) >= self::BATCH_AGGREGATION_INTERVAL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue