File tree Expand file tree Collapse file tree 2 files changed +2
-14
lines changed
Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -509,12 +509,7 @@ export class SegmentClient {
509509 if ( this . enabled . get ( ) === false ) {
510510 return ;
511511 }
512- if ( ! this . running . get ( ) ) {
513- // If not running, queue the event for later processing
514- await this . store . pendingEvents . add ( event ) ;
515- return event ;
516- }
517- if ( this . isReady . value ) {
512+ if ( ! this . running . get ( ) || ! this . isReady . value ) {
518513 return this . startTimelineProcessing ( event ) ;
519514 } else {
520515 this . store . pendingEvents . add ( event ) ;
@@ -532,7 +527,7 @@ export class SegmentClient {
532527 ) : Promise < SegmentEvent | undefined > {
533528 const event = await this . applyContextData ( incomingEvent ) ;
534529 this . flushPolicyExecuter . notify ( event ) ;
535- return await this . timeline . process ( event ) ;
530+ return this . timeline . process ( event ) ;
536531 }
537532
538533 private async trackDeepLinks ( ) {
Original file line number Diff line number Diff line change @@ -73,13 +73,6 @@ export class QueueFlushingPlugin extends UtilityPlugin {
7373 * Calls the onFlush callback with the events in the queue
7474 */
7575 async flush ( ) {
76- // Check if event processing is running
77- const running = this . analytics ?. running . get ( ) ;
78- if ( running === false ) {
79- this . analytics ?. logger . info ( 'Event processing is paused, skipping flush' ) ;
80- return ;
81- }
82-
8376 // Wait for the queue to be restored
8477 try {
8578 await this . isRestored ;
You can’t perform that action at this time.
0 commit comments