Skip to content

Commit

Permalink
use curl for healthchecks
Browse files Browse the repository at this point in the history
  • Loading branch information
VladStarr committed Feb 27, 2024
1 parent 20cd1b6 commit 2327716
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dysnix/arbitrum/templates/scripts/_liveness.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ fi

# expected output format: 0x50938d
get_block_number() {
wget "http://localhost:$HTTP_PORT" -qO- \
--header 'Content-Type: application/json' \
--post-data '{"jsonrpc":"2.0","method":"eth_blockNumber","id":1}' \
curl -s "http://localhost:$HTTP_PORT" \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","id":1}' \
| sed -r 's/.*"result":"([^"]+)".*/\1/g'
}

Expand Down
6 changes: 3 additions & 3 deletions dysnix/arbitrum/templates/scripts/_readiness.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ fi

# expected output format: 0x65cb8ca8
get_block_timestamp() {
wget "http://localhost:$HTTP_PORT" -qO- \
--header 'Content-Type: application/json' \
--post-data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' \
curl -s "http://localhost:$HTTP_PORT" \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' \
| sed -r 's/.*"timestamp":"([^"]+)".*/\1/g'
}

Expand Down

0 comments on commit 2327716

Please sign in to comment.