Skip to content

Commit

Permalink
Rename ncli status file
Browse files Browse the repository at this point in the history
  • Loading branch information
badrogger committed Jun 20, 2024
1 parent 6908f68 commit f6d413a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions node_cli/configs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

NODE_DATA_PATH = os.path.join(SKALE_DIR, 'node_data')
SCHAIN_NODE_DATA_PATH = os.path.join(NODE_DATA_PATH, 'schains')
NODE_CLI_STATUS_FILENAME = 'node_cli.status'
NODE_CONFIG_PATH = os.path.join(NODE_DATA_PATH, 'node_config.json')
CONTAINER_CONFIG_PATH = os.path.join(SKALE_DIR, 'config')
CONTAINER_CONFIG_TMP_PATH = os.path.join(SKALE_TMP_DIR, 'config')
Expand Down
6 changes: 3 additions & 3 deletions node_cli/core/schains.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from node_cli.configs import (
ALLOCATION_FILEPATH,
NODE_CONFIG_PATH,
NODE_CLI_STATUS_FILENAME,
SCHAIN_NODE_DATA_PATH
)
from node_cli.configs.env import get_env_config
Expand Down Expand Up @@ -90,7 +91,7 @@ def show_config(name: str) -> None:


def get_node_cli_schain_status_filepath(schain_name: str) -> str:
return os.path.join(SCHAIN_NODE_DATA_PATH, schain_name, 'node-cli.status')
return os.path.join(SCHAIN_NODE_DATA_PATH, schain_name, NODE_CLI_STATUS_FILENAME)


def update_node_cli_schain_status(schain_name: str, status: dict) -> None:
Expand All @@ -104,8 +105,7 @@ def toggle_schain_repair_mode(
) -> None:
ts = int(time.time())
status = {'schain_name': schain, 'repair_ts': ts}
if snapshot_from:
status.update({'snapshot_from': snapshot_from})
status.update({'snapshot_from': snapshot_from})
update_node_cli_schain_status(schain, status)
print('Schain has been set for repair')

Expand Down

0 comments on commit f6d413a

Please sign in to comment.