diff --git a/src/Storage/Repository.php b/src/Storage/Repository.php index 7cff9c5..e55831f 100644 --- a/src/Storage/Repository.php +++ b/src/Storage/Repository.php @@ -142,6 +142,8 @@ class Repository sourceName: $sourceName, ); + $this->buffer->flushAlerts(); + $createdAt = new \DateTimeImmutable($result['created_at']); return new Alert( @@ -233,6 +235,7 @@ class Repository public function storeLogEntry(string $line, ?int $sourceId = null, ?string $sourceName = null, ?string $level = null): void { $this->buffer->pushLog($line, $sourceId, $sourceName, $level); + $this->buffer->flushLogs(); } public function searchLogEntries(string $query, int $limit = 200, int $offset = 0, ?string $since = null, ?string $until = null): array