File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,10 @@ def process(self, user_event):
228
228
self .logger .debug ('Payload not accepted by the queue. Current size: {}' .format (str (self .event_queue .qsize ())))
229
229
230
230
def _add_to_batch (self , user_event ):
231
+ """ Method to append received user event to current batch.
232
+ Args:
233
+ user_event: UserEvent Instance.
234
+ """
231
235
if self ._should_split (user_event ):
232
236
self ._flush_queue ()
233
237
self ._current_batch = list ()
@@ -243,6 +247,14 @@ def _add_to_batch(self, user_event):
243
247
self ._flush_queue ()
244
248
245
249
def _should_split (self , user_event ):
250
+ """ Method to check if current event batch should split into two.
251
+ Args:
252
+ user_event: UserEvent Instance.
253
+ Return Value:
254
+ - True, if revision number and project_id of last event in current batch do not match received event's
255
+ revision number and project id respectively.
256
+ - False, otherwise.
257
+ """
246
258
if len (self ._current_batch ) == 0 :
247
259
return False
248
260
You can’t perform that action at this time.
0 commit comments