File tree Expand file tree Collapse file tree 2 files changed +1
-22
lines changed
src/sentry/rules/processing Expand file tree Collapse file tree 2 files changed +1
-22
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ def process_buffer() -> None:
194
194
195
195
project_ids = list (all_project_ids_and_timestamps .keys ())
196
196
for project_id in project_ids :
197
- process_in_batches (project_id , processing_type )
197
+ process_in_batches (buffer , project_id , processing_type )
198
198
199
199
buffer .delete_keys (
200
200
buffer_keys ,
Original file line number Diff line number Diff line change @@ -322,27 +322,6 @@ def test_bulk_sorted_set_single_key(self) -> None:
322
322
assert len (project_ids_and_timestamps ) == 4
323
323
assert set (project_ids_and_timestamps .keys ()) == set (project_ids )
324
324
325
- def test_buffer_hook_registry (self ) -> None :
326
- """Test that we can add an event to the registry and that the callback is invoked"""
327
- mock = Mock ()
328
- redis_buffer_registry ._registry [BufferHookEvent .FLUSH ] = mock
329
-
330
- redis_buffer_registry .callback (BufferHookEvent .FLUSH )
331
- assert mock .call_count == 1
332
-
333
- @mock .patch ("sentry.rules.processing.buffer_processing.metrics.timer" )
334
- def test_callback (self , mock_metrics_timer : MagicMock ) -> None :
335
- redis_buffer_registry .add_handler (BufferHookEvent .FLUSH , process_buffer )
336
- self .buf .process_batch ()
337
- assert mock_metrics_timer .call_count == 1
338
-
339
- def test_process_batch (self ) -> None :
340
- """Test that the registry's callbacks are invoked when we process a batch"""
341
- mock = Mock ()
342
- redis_buffer_registry ._registry [BufferHookEvent .FLUSH ] = mock
343
- self .buf .process_batch ()
344
- assert mock .call_count == 1
345
-
346
325
def test_delete_batch (self ) -> None :
347
326
"""Test that after we add things to redis we can clean it up"""
348
327
project_id = 1
You can’t perform that action at this time.
0 commit comments