File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ export async function bootWorkers() {
3333  const  eventsGroupWorker  =  new  GroupWorker < 
3434    EventsQueuePayloadIncomingEvent [ 'payload' ] 
3535  > ( { 
36-     // redis: getRedisGroupQueue(), 
3736    queue : eventsGroupQueue , 
3837    handler : async  ( job )  =>  { 
3938      logger . info ( 'processing event (group queue)' ,  { 
Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ import type { IClickhouseSession } from '../services/session.service';
99import  {  BaseBuffer  }  from  './base-buffer' ; 
1010
1111export  class  SessionBuffer  extends  BaseBuffer  { 
12-   private  batchSize  =  0 ; 
12+   private  batchSize  =  process . env . SESSION_BUFFER_BATCH_SIZE 
13+     ? Number . parseInt ( process . env . SESSION_BUFFER_BATCH_SIZE ,  10 ) 
14+     : 1000 ; 
1315
1416  private  readonly  redisKey  =  'session-buffer' ; 
1517  private  redis : Redis ; 
@@ -62,11 +64,11 @@ export class SessionBuffer extends BaseBuffer {
6264      if  ( duration  >  0 )  { 
6365        newSession . duration  =  duration ; 
6466      }  else  { 
65-         //  this.logger.warn('Session duration is negative', {
66-         //    duration,
67-         //    event,
68-         //    session: newSession,
69-         //  });
67+         this . logger . warn ( 'Session duration is negative' ,  { 
68+           duration, 
69+           event, 
70+           session : newSession , 
71+         } ) ; 
7072      } 
7173      newSession . properties  =  toDots ( { 
7274        ...( event . properties  ||  { } ) , 
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ export const eventsGroupQueue = new GroupQueue<
109109> ( { 
110110  namespace : 'group_events' , 
111111  redis : getRedisGroupQueue ( ) , 
112-   orderingDelayMs : 5_000 , 
112+   orderingDelayMs : 2_000 , 
113113  keepCompleted : 1000 , 
114114  keepFailed : Number . MAX_SAFE_INTEGER , 
115115} ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments