From 9526e12abde57cae8960598cc0d3fc5df4688bfc Mon Sep 17 00:00:00 2001 From: Joe Tretter Date: Fri, 9 Aug 2024 08:46:53 -0500 Subject: [PATCH] make falling back to stitching the default behavior. --- recordAllSymbolsSingleRun.sh | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/recordAllSymbolsSingleRun.sh b/recordAllSymbolsSingleRun.sh index 9139604..f8a4331 100755 --- a/recordAllSymbolsSingleRun.sh +++ b/recordAllSymbolsSingleRun.sh @@ -29,19 +29,6 @@ jq -r '.[].Symbol' allSymbols.json | sort | while read theSymbol; do continue fi - if [[ 'SPY' = ${theSymbol} ]]; then - ./recordOptionChainSingleSymbolSingleRun.sh ${theSymbol} - if [[ $? -ne 0 ]]; then - systemd-cat -t "`basename $0`" -p warning <<< "falling back to stitching for ${theSymbol}" - ./recordOptionChainSingleSymbolSpecialRun.sh ${theSymbol} - if [[ $? -ne 0 ]]; then - touch temp/hadErrors.$$.tmp - fi - fi - - continue - fi - if [[ '$SPX' = ${theSymbol} ]]; then ./recordOptionChainSingleSymbolSingleRun.sh ${theSymbol} fromDate $(date "+%Y-%m-%d" -d "+40 days") toDate $(date "+%Y-%m-%d" -d "+46 days") if [[ $? -ne 0 ]]; then @@ -50,9 +37,14 @@ jq -r '.[].Symbol' allSymbols.json | sort | while read theSymbol; do continue fi - ./recordOptionChainSingleSymbolSingleRun.sh ${theSymbol} + #Default behavior - fall back to stitching on error + ./recordOptionChainSingleSymbolSingleRun.sh ${theSymbol} if [[ $? -ne 0 ]]; then - touch temp/hadErrors.$$.tmp + systemd-cat -t "`basename $0`" -p warning <<< "falling back to stitching for ${theSymbol}" + ./recordOptionChainSingleSymbolSpecialRun.sh ${theSymbol} + if [[ $? -ne 0 ]]; then + touch temp/hadErrors.$$.tmp + fi fi done