Skip to content

Commit

Permalink
Merge pull request #1120 from skalenetwork/fix-cleaner
Browse files Browse the repository at this point in the history
Fix cleaner. Add more logs
  • Loading branch information
DmytroNazarenko authored Oct 25, 2024
2 parents 972d405 + 2c8add7 commit dbc7a0d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion core/schains/cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,14 @@ def monitor(skale, node_config, dutils=None):

for schain_name in schains_on_node:
if schain_name not in schain_names_on_contracts:
logger.warning(
logger.info(
'%s was found on node, but not on contracts: %s, trying to cleanup',
schain_name,
schain_names_on_contracts,
)
if schain_name == '':
logger.warning('Found phantom schain on node')
continue
try:
ensure_schain_removed(skale, schain_name, node_config.id, dutils=dutils)
except Exception:
Expand All @@ -138,6 +141,12 @@ def get_schains_on_node(dutils=None):
schains_with_dirs = os.listdir(SCHAINS_DIR_PATH)
schains_with_container = get_schains_with_containers(dutils)
schains_active_records = get_schains_names()
logger.info(
'dirs %s, containers: %s, records: %s',
schains_with_dirs,
schains_with_container,
schains_active_records
)
return sorted(merged_unique(schains_with_dirs, schains_with_container, schains_active_records))


Expand Down

0 comments on commit dbc7a0d

Please sign in to comment.