Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed factory sync classes
  • Loading branch information
Bilal Al committed Dec 19, 2024
commit b9767973a59d7915454d93d1ca016728c81cf536
3 changes: 2 additions & 1 deletion splitio/engine/impressions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def set_classes_async(storage_mode, impressions_mode, api_adapter, imp_counter,
api_impressions_adapter = api_adapter['impressions']
sender_adapter = InMemorySenderAdapterAsync(api_telemetry_adapter)

none_strategy = StrategyNoneMode()
unique_keys_synchronizer = UniqueKeysSynchronizerAsync(sender_adapter, unique_keys_tracker)
unique_keys_task = UniqueKeysSyncTaskAsync(unique_keys_synchronizer.send_all)
clear_filter_sync = ClearFilterSynchronizerAsync(unique_keys_tracker)
Expand All @@ -134,4 +135,4 @@ def set_classes_async(storage_mode, impressions_mode, api_adapter, imp_counter,
imp_strategy = StrategyOptimizedMode()

return unique_keys_synchronizer, clear_filter_sync, unique_keys_task, clear_filter_task, \
impressions_count_sync, impressions_count_task, imp_strategy
impressions_count_sync, impressions_count_task, imp_strategy, none_strategy
2 changes: 1 addition & 1 deletion tests/client/test_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,6 @@ async def _make_factory_with_apikey(apikey, *_, **__):

factory = await get_factory_async("none", config=config)
await factory.destroy()
await asyncio.sleep(0.1)
await asyncio.sleep(0.5)
assert factory.destroyed
assert len(build_redis.mock_calls) == 2