22
22
from src .queries .get_sol_plays import get_sol_play_health_info
23
23
from src .queries .get_trusted_notifier_discrepancies import get_delist_statuses_ok
24
24
from src .tasks .index_core import (
25
+ CoreHealth ,
25
26
core_health_check_cache_key ,
26
27
core_listens_health_check_cache_key ,
27
28
)
@@ -263,7 +264,7 @@ def get_health(args: GetHealthArgs, use_redis_cache: bool = True) -> Tuple[Dict,
263
264
latest_indexed_block_num = db_block_state ["number" ] or 0
264
265
latest_indexed_block_hash = db_block_state ["blockhash" ]
265
266
266
- core_health = get_core_health (redis = redis )
267
+ core_health : CoreHealth = get_core_health (redis = redis )
267
268
core_listens_health = get_core_listens_health (
268
269
redis = redis , plays_count_max_drift = plays_count_max_drift
269
270
)
@@ -273,6 +274,13 @@ def get_health(args: GetHealthArgs, use_redis_cache: bool = True) -> Tuple[Dict,
273
274
if indexing_plays_with_core :
274
275
play_health_info = core_listens_health
275
276
277
+ indexing_entity_manager_with_core = core_health and core_health .get (
278
+ "indexing_entity_manager"
279
+ )
280
+ if indexing_entity_manager_with_core :
281
+ latest_indexed_block_num = core_health .get ("latest_indexed_block" ) or - 1
282
+ latest_block_num = core_health .get ("latest_chain_block" ) or - 1
283
+
276
284
user_bank_health_info = get_solana_indexer_status (
277
285
redis , redis_keys .solana .user_bank , user_bank_max_drift
278
286
)
0 commit comments