Skip to content

Commit

Permalink
fix: to show 'Queue restoration timeout' only once (#1013)
Browse files Browse the repository at this point in the history
Co-authored-by: Sunita Prajapati <>
  • Loading branch information
thesunita authored Oct 22, 2024
1 parent 0ab454f commit bbcf40c
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 bbcf40c

Please sign in to comment.