mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
finally unset
This commit is contained in:
@@ -131,19 +131,19 @@ class Audits extends Action
|
||||
return new NoCommit();
|
||||
}
|
||||
|
||||
$logs = $this->logs;
|
||||
$this->logs = [];
|
||||
|
||||
foreach ($logs as $projectLogs) {
|
||||
foreach ($this->logs as $sequence => $projectLogs) {
|
||||
try {
|
||||
Console::log('Processing Project "' . $sequence . '" batch with ' . count($projectLogs['logs']) . ' events');
|
||||
|
||||
$projectDocument = $projectLogs['project'];
|
||||
Console::log('Processing Project "' . $projectDocument->getSequence() . '" batch with ' . count($projectLogs['logs']) . ' events');
|
||||
$dbForProject = $getProjectDB($projectDocument);
|
||||
$audit = new Audit($dbForProject);
|
||||
$audit->logBatch($projectLogs['logs']);
|
||||
Console::success('Audit logs processed successfully');
|
||||
|
||||
} catch (Throwable $e) {
|
||||
Console::error('Error processing audit logs for Project "' . $projectDocument->getSequence() . '": ' . $e->getMessage());
|
||||
} finally {
|
||||
unset($this->logs[$sequence]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user