Skip to content

Commit

Permalink
use source env var
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-shashank committed Jun 6, 2024
1 parent 7e8bb5e commit 77f1e96
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions ansible/archival-snapshots/resources/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ LATEST_EPOCH=$($FOREST_CLI sync status | grep "Height:" | awk '{print $2}')
echo "Latest Height: $LATEST_EPOCH"

while ((LATEST_EPOCH - CURRENT_EPOCH > 30000)); do
export $FULLNODE_API_INFO
echo "USING FULLNODE API: $FULLNODE_API_INFO"
NEW_EPOCH=$((CURRENT_EPOCH + 30000))
echo "Next Height: $NEW_EPOCH"

Expand All @@ -60,6 +58,7 @@ while ((LATEST_EPOCH - CURRENT_EPOCH > 30000)); do

if [ ! -f "$FULL_SNAPSHOTS_DIR/$NEW_SNAPSHOT" ]; then
echo "Exporting snapshot: $FULL_SNAPSHOTS_DIR/$NEW_SNAPSHOT"
echo "USING FULLNODE API: $FULLNODE_API_INFO"
$FOREST_CLI snapshot export --tipset "$NEW_EPOCH" --depth 30000 -o "$FULL_SNAPSHOTS_DIR/$NEW_SNAPSHOT" > export.txt
echo "Snapshot exported: $FULL_SNAPSHOTS_DIR/$NEW_SNAPSHOT"
else
Expand Down
1 change: 0 additions & 1 deletion ansible/archival-snapshots/resources/set_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ update_fullnode_api_info() {

# Execute update_fullnode_api_info
update_fullnode_api_info
echo "Using FULLNODE API: $FULLNODE_API_INFO"

# Source this script to update the variable in the current shell
source "$0"

0 comments on commit 77f1e96

Please sign in to comment.