Fixing the problems I have introduced in my last change.

This commit is contained in:
2024-08-27 12:59:41 -05:00
parent a6b7fc7afe
commit 44dc8a4254
5 changed files with 9 additions and 9 deletions

View File

@@ -40,9 +40,9 @@ marketsCheck=$(jq -e -r '.. | .isOpen?' temp/markets.tmp.$$.json | grep -v null
if [[ ${marketsCheck} -eq 0 ]]; then if [[ ${marketsCheck} -eq 0 ]]; then
errMsg="ERROR: THE RESPONSE IS INCORRECT! markets: _${markets}_ Check: _${marketsCheck}_ check file _temp/markets.tmp.$$.json_" errMsg="ERROR: THE RESPONSE IS INCORRECT! markets: _${markets}_ Check: _${marketsCheck}_ check file _temp/markets.tmp.$$.json_"
if [[ "${ErrorLogLevel}" == "err" ]]; then if [[ "${ErrorLogLevel}" == "err" ]]; then
throw ${errMsg} ${ErrorLogLevel} throw "${errMsg}" ${ErrorLogLevel}
else else
log ${errMsg} ${ErrorLogLevel} log "${errMsg}" ${ErrorLogLevel}
fi fi
else else
jq < temp/markets.tmp.$$.json jq < temp/markets.tmp.$$.json

View File

@@ -32,9 +32,9 @@ symbolCheck=$(jq -r ${jqQuery} < temp/optionChain.${symbol}.tmp.$$.json)
if [[ "${symbol}" != "${symbolCheck}" ]]; then if [[ "${symbol}" != "${symbolCheck}" ]]; then
errMsg="ERROR: THE RESPONSE IS INCORRECT! Symbol: _${symbol}_ Check: _${symbolCheck}_ check file _temp/optionChain.${symbol}.tmp.$$.json_" errMsg="ERROR: THE RESPONSE IS INCORRECT! Symbol: _${symbol}_ Check: _${symbolCheck}_ check file _temp/optionChain.${symbol}.tmp.$$.json_"
if [[ "${ErrorLogLevel}" == "err" ]]; then if [[ "${ErrorLogLevel}" == "err" ]]; then
throw ${errMsg} ${ErrorLogLevel} 2 throw "${errMsg}" ${ErrorLogLevel} 2
else else
log ${errMsg} ${ErrorLogLevel} log "${errMsg}" ${ErrorLogLevel}
fi fi
else else
jq < temp/optionChain.${symbol}.tmp.$$.json jq < temp/optionChain.${symbol}.tmp.$$.json

View File

@@ -3,11 +3,11 @@
. helpers.sh . helpers.sh
log Started log "Started"
./getNewAccessToken.sh ./getNewAccessToken.sh
if [[ $? -ne 0 ]]; then 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 fi
jq -r '.[].Symbol' allSymbols.json | sort | while read theSymbol; do jq -r '.[].Symbol' allSymbols.json | sort | while read theSymbol; do

View File

@@ -34,9 +34,9 @@ symbolCheck=$(jq -r ${jqQuery} < temp/optionChain.${symbol}.tmp.$$.json)
if [[ "${symbol}" != "${symbolCheck}" ]]; then if [[ "${symbol}" != "${symbolCheck}" ]]; then
errMsg="ERROR: THE RESPONSE IS INCORRECT! Symbol: _${symbol}_ Check: _${symbolCheck}_ check file _temp/optionChain.${symbol}.tmp.$$.json_" errMsg="ERROR: THE RESPONSE IS INCORRECT! Symbol: _${symbol}_ Check: _${symbolCheck}_ check file _temp/optionChain.${symbol}.tmp.$$.json_"
if [[ "${ErrorLogLevel}" == "err" ]]; then if [[ "${ErrorLogLevel}" == "err" ]]; then
throw ${errMsg} ${ErrorLogLevel} 2 throw "${errMsg}" ${ErrorLogLevel} 2
else else
log ${errMsg} ${ErrorLogLevel} log "${errMsg}" ${ErrorLogLevel}
fi fi
else else
optionChainFileName=$(date "+%Y-%m-%d %H_%M_%S")_optionChain.${symbol}.json optionChainFileName=$(date "+%Y-%m-%d %H_%M_%S")_optionChain.${symbol}.json

View File

@@ -14,7 +14,7 @@ jqQuery=".\"${symbol}\".symbol"
symbolCheck=$(jq -r ${jqQuery} < temp/quote.${symbol}.tmp.$$.json) symbolCheck=$(jq -r ${jqQuery} < temp/quote.${symbol}.tmp.$$.json)
if [[ "${symbol}" != "${symbolCheck}" ]]; then if [[ "${symbol}" != "${symbolCheck}" ]]; then
errMsg="ERROR: THE RESPONSE IS INCORRECT! Symbol: _${symbol}_ Check: _${symbolCheck}_ check file _temp/quote.${symbol}.tmp.$$.json_" 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 else
quoteFileName=$(date "+%Y-%m-%d %H_%M_%S")_quote.${symbol}.json quoteFileName=$(date "+%Y-%m-%d %H_%M_%S")_quote.${symbol}.json
#echo writing to file "${outDir}/${quoteFileName}" #echo writing to file "${outDir}/${quoteFileName}"