Fix batch flush to Clearcut (#1337)

Co-authored-by: Scott Densmore <scottdensmore@mac.com>
This commit is contained in:
Jerop Kipruto 2025-06-23 17:12:58 -04:00 committed by GitHub
parent d2ae7af487
commit 4d88054d35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,6 @@ export class ClearcutLogger {
}
this.flushToClearcut();
this.last_flush_time = Date.now();
}
flushToClearcut(): Promise<LogResponse> {
@ -121,6 +120,7 @@ export class ClearcutLogger {
}).then((buf: Buffer) => {
try {
this.events.length = 0;
this.last_flush_time = Date.now();
return this.decodeLogResponse(buf) || {};
} catch (error: unknown) {
console.error('Error flushing log events:', error);