From 44dc8a4254b2c9e5e5a37428d92e111fd9319ab1 Mon Sep 17 00:00:00 2001 From: Joe Tretter Date: Tue, 27 Aug 2024 12:59:41 -0500 Subject: [PATCH] Fixing the problems I have introduced in my last change. --- getMarketHours.sh | 4 ++-- getOptionChain.sh | 4 ++-- recordAllSymbolsSingleRun.sh | 4 ++-- recordOptionChainSingleSymbolSingleRun.sh | 4 ++-- recordQuoteSingleSymbolSingleRun.sh | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/getMarketHours.sh b/getMarketHours.sh index e1c6482..44ff5a2 100755 --- a/getMarketHours.sh +++ b/getMarketHours.sh @@ -40,9 +40,9 @@ marketsCheck=$(jq -e -r '.. | .isOpen?' temp/markets.tmp.$$.json | grep -v null if [[ ${marketsCheck} -eq 0 ]]; then errMsg="ERROR: THE RESPONSE IS INCORRECT! markets: _${markets}_ Check: _${marketsCheck}_ check file _temp/markets.tmp.$$.json_" if [[ "${ErrorLogLevel}" == "err" ]]; then - throw ${errMsg} ${ErrorLogLevel} + throw "${errMsg}" ${ErrorLogLevel} else - log ${errMsg} ${ErrorLogLevel} + log "${errMsg}" ${ErrorLogLevel} fi else jq < temp/markets.tmp.$$.json diff --git a/getOptionChain.sh b/getOptionChain.sh index 68fd549..2fa5383 100755 --- a/getOptionChain.sh +++ b/getOptionChain.sh @@ -32,9 +32,9 @@ symbolCheck=$(jq -r ${jqQuery} < temp/optionChain.${symbol}.tmp.$$.json) if [[ "${symbol}" != "${symbolCheck}" ]]; then errMsg="ERROR: THE RESPONSE IS INCORRECT! Symbol: _${symbol}_ Check: _${symbolCheck}_ check file _temp/optionChain.${symbol}.tmp.$$.json_" if [[ "${ErrorLogLevel}" == "err" ]]; then - throw ${errMsg} ${ErrorLogLevel} 2 + throw "${errMsg}" ${ErrorLogLevel} 2 else - log ${errMsg} ${ErrorLogLevel} + log "${errMsg}" ${ErrorLogLevel} fi else jq < temp/optionChain.${symbol}.tmp.$$.json diff --git a/recordAllSymbolsSingleRun.sh b/recordAllSymbolsSingleRun.sh index 909ce41..f8a24ce 100755 --- a/recordAllSymbolsSingleRun.sh +++ b/recordAllSymbolsSingleRun.sh @@ -3,11 +3,11 @@ . helpers.sh -log Started +log "Started" ./getNewAccessToken.sh if [[ $? -ne 0 ]]; then - log "Child process to get access token reported error. Exiting." err 1 + throw "Child process to get access token reported error. Exiting." err 1 fi jq -r '.[].Symbol' allSymbols.json | sort | while read theSymbol; do diff --git a/recordOptionChainSingleSymbolSingleRun.sh b/recordOptionChainSingleSymbolSingleRun.sh index 3b2fcc8..0939d52 100755 --- a/recordOptionChainSingleSymbolSingleRun.sh +++ b/recordOptionChainSingleSymbolSingleRun.sh @@ -34,9 +34,9 @@ symbolCheck=$(jq -r ${jqQuery} < temp/optionChain.${symbol}.tmp.$$.json) if [[ "${symbol}" != "${symbolCheck}" ]]; then errMsg="ERROR: THE RESPONSE IS INCORRECT! Symbol: _${symbol}_ Check: _${symbolCheck}_ check file _temp/optionChain.${symbol}.tmp.$$.json_" if [[ "${ErrorLogLevel}" == "err" ]]; then - throw ${errMsg} ${ErrorLogLevel} 2 + throw "${errMsg}" ${ErrorLogLevel} 2 else - log ${errMsg} ${ErrorLogLevel} + log "${errMsg}" ${ErrorLogLevel} fi else optionChainFileName=$(date "+%Y-%m-%d %H_%M_%S")_optionChain.${symbol}.json diff --git a/recordQuoteSingleSymbolSingleRun.sh b/recordQuoteSingleSymbolSingleRun.sh index 21608a6..437a1d5 100755 --- a/recordQuoteSingleSymbolSingleRun.sh +++ b/recordQuoteSingleSymbolSingleRun.sh @@ -14,7 +14,7 @@ jqQuery=".\"${symbol}\".symbol" symbolCheck=$(jq -r ${jqQuery} < temp/quote.${symbol}.tmp.$$.json) if [[ "${symbol}" != "${symbolCheck}" ]]; then errMsg="ERROR: THE RESPONSE IS INCORRECT! Symbol: _${symbol}_ Check: _${symbolCheck}_ check file _temp/quote.${symbol}.tmp.$$.json_" - throw ${errMsg} err 2 + throw "${errMsg}" err 2 else quoteFileName=$(date "+%Y-%m-%d %H_%M_%S")_quote.${symbol}.json #echo writing to file "${outDir}/${quoteFileName}"