Fixing the problems I have introduced in my last change.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user