mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Fix batch flush to Clearcut (#1337)
Co-authored-by: Scott Densmore <scottdensmore@mac.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user