Skip to content

Commit b080931

Browse files
add retry and timeout to curl command
1 parent ee5632b commit b080931

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/contexts.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
CRDS_SERVER_URL: https://hst-crds.stsci.edu
2727
run: >
2828
echo "pmap=$(
29-
curl -s -X POST -d '{"jsonrpc": "1.0", "method": "get_default_context", "params": ["${{ env.OBSERVATORY }}"], "id": 1}' ${{ env.CRDS_SERVER_URL }}/json/ |
29+
curl -s -X POST -d '{"jsonrpc": "1.0", "method": "get_default_context", "params": ["${{ env.OBSERVATORY }}"], "id": 1}' ${{ env.CRDS_SERVER_URL }}/json/ --retry 8 --connect-timeout 10 |
3030
python -c "import sys, json; print(json.load(sys.stdin)['result'])"
3131
)" >> $GITHUB_OUTPUT
3232
- run: if [[ ! -z "${{ steps.hst_crds_context.outputs.pmap }}" ]]; then echo ${{ steps.hst_crds_context.outputs.pmap }}; else exit 1; fi
@@ -36,7 +36,7 @@ jobs:
3636
CRDS_SERVER_URL: https://jwst-crds.stsci.edu
3737
run: >
3838
echo "pmap=$(
39-
curl -s -X POST -d '{"jsonrpc": "1.0", "method": "get_default_context", "params": ["${{ env.OBSERVATORY }}"], "id": 1}' ${{ env.CRDS_SERVER_URL }}/json/ |
39+
curl -s -X POST -d '{"jsonrpc": "1.0", "method": "get_default_context", "params": ["${{ env.OBSERVATORY }}"], "id": 1}' ${{ env.CRDS_SERVER_URL }}/json/ --retry 8 --connect-timeout 10 |
4040
python -c "import sys, json; print(json.load(sys.stdin)['result'])"
4141
)" >> $GITHUB_OUTPUT
4242
- run: if [[ ! -z "${{ steps.jwst_crds_context.outputs.pmap }}" ]]; then echo ${{ steps.jwst_crds_context.outputs.pmap }}; else exit 1; fi
@@ -46,7 +46,7 @@ jobs:
4646
CRDS_SERVER_URL: https://roman-crds.stsci.edu
4747
run: >
4848
echo "pmap=$(
49-
curl -s -X POST -d '{"jsonrpc": "1.0", "method": "get_default_context", "params": ["${{ env.OBSERVATORY }}"], "id": 1}' ${{ env.CRDS_SERVER_URL }}/json/ |
49+
curl -s -X POST -d '{"jsonrpc": "1.0", "method": "get_default_context", "params": ["${{ env.OBSERVATORY }}"], "id": 1}' ${{ env.CRDS_SERVER_URL }}/json/ --retry 8 |
5050
python -c "import sys, json; print(json.load(sys.stdin)['result'])"
5151
)" >> $GITHUB_OUTPUT
5252
- run: if [[ ! -z "${{ steps.roman_crds_context.outputs.pmap }}" ]]; then echo ${{ steps.roman_crds_context.outputs.pmap }}; else exit 1; fi

0 commit comments

Comments
 (0)