From b8fe525cbe269222f81e301f273c9e71e12e540a Mon Sep 17 00:00:00 2001 From: lash Date: Thu, 10 Nov 2022 13:43:08 +0000 Subject: [PATCH] Reactivate cache rpc --- eth_monitor/settings.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/eth_monitor/settings.py b/eth_monitor/settings.py index 6a8487c..657b6d5 100644 --- a/eth_monitor/settings.py +++ b/eth_monitor/settings.py @@ -347,9 +347,12 @@ def process_renderer(settings, config): def process_cache_rpc(settings, config): + if str(settings.get('CACHE_STORE')) == 'Nullstore': + logg.debug('cache store is null, cache rpc proxy will be deactivated') + return settings if not config.true('_FRESH'): - rpc = CacheRPC(settings.get('RPC'), cache_store) - settings.set('RPC', rpc) + rpc = CacheRPC(settings.get('CONN'), settings.get('CACHE_STORE')) + settings.set('CONN', rpc) return settings @@ -372,6 +375,7 @@ def process_sync(settings, config): def process_cache(settings, config): settings = process_cache_store(settings, config) + settings = process_cache_rpc(settings, config) return settings