Skip to content

Commit

Permalink
fix: to show 'Queue restoration timeout' only once
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunita Prajapati committed Oct 22, 2024
1 parent 0ab454f commit a971498
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/core/src/plugins/QueueFlushingPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ export class QueueFlushingPlugin extends UtilityPlugin {
}
} catch (e) {
// If the queue is not restored before the timeout, we will notify but not block flushing events
this.analytics?.reportInternalError(
new SegmentError(
ErrorType.InitializationError,
'Queue restoration timeout',
e
)
);

if (this.timeoutWarned === false) {
this.analytics?.reportInternalError(
new SegmentError(
ErrorType.InitializationError,
'Queue restoration timeout',
e
)
);

this.analytics?.logger.warn(
'Flush triggered but queue restoration and settings loading not complete. Flush will be retried.',
e
Expand Down

0 comments on commit a971498

Please sign in to comment.