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 @@ -217,6 +217,10 @@ def process(self, user_event):
217
217
self .logger .debug ('Payload not accepted by the queue. Current size: {}' .format (str (self .event_queue .qsize ())))
218
218
219
219
def _add_to_batch (self , user_event ):
220
+ """ Method to append received user event to current batch.
221
+ Args:
222
+ user_event: UserEvent Instance.
223
+ """
220
224
if self ._should_split (user_event ):
221
225
self ._flush_queue ()
222
226
self ._current_batch = list ()
@@ -232,6 +236,14 @@ def _add_to_batch(self, user_event):
232
236
self ._flush_queue ()
233
237
234
238
def _should_split (self , user_event ):
239
+ """ Method to check if current event batch should split into two.
240
+ Args:
241
+ user_event: UserEvent Instance.
242
+ Return Value:
243
+ - True, if revision number and project_id of last event in current batch do not match received event's
244
+ revision number and project id respectively.
245
+ - False, otherwise.
246
+ """
235
247
if len (self ._current_batch ) == 0 :
236
248
return False
237
249
You can’t perform that action at this time.
0 commit comments