Fixing the continuous loader after hidden breaking changes from yesterday

This commit is contained in:
2024-08-21 11:18:47 -05:00
parent 12fd00b3cd
commit 08cd1d870a

View File

@@ -5,7 +5,7 @@ while /bin/true; do
echo Processing ${singleFile} | tee | systemd-cat -t "`basename $0`" -p info echo Processing ${singleFile} | tee | systemd-cat -t "`basename $0`" -p info
symbol=$(pbzip2 -dc "${singleFile}" | jq -e -r '.symbol' | tr -d '$') symbol=$(pbzip2 -dc "${singleFile}" | jq -e -r '.symbol' | tr -d '$')
timeStamp=$(basename "${singleFile}" | cut -c 1-19 | tr '_' ":") timeStamp=$(basename "${singleFile}" | cut -c 1-19 | tr '_' ":")
insertSQL=$(cat <<EOF insertSQL=$(cat <<-EOF
.timeout 10000; .timeout 10000;
insert into OptionQuotes ( insert into OptionQuotes (
TimeStamp, TimeStamp,
@@ -14,7 +14,7 @@ while /bin/true; do
) select ) select
datetime('${timeStamp}','utc'), datetime('${timeStamp}','utc'),
'${symbol}', '${symbol}',
'$(pbzip2 -dc "${singleFile}")' 'test'
where not exists (select 1 where not exists (select 1
from OptionQuotes from OptionQuotes
where TimeStamp=datetime('${timeStamp}','utc') where TimeStamp=datetime('${timeStamp}','utc')
@@ -22,7 +22,7 @@ while /bin/true; do
); );
EOF EOF
) )
echo $insertSQL | sqlite3 consolidated.sqlite3 echo "$insertSQL" | sqlite3 consolidated.sqlite3
touch -r "${singleFile}" lastRun.stamp touch -r "${singleFile}" lastRun.stamp
done) 2>&1 | systemd-cat -t "`basename $0`" -p debug done) 2>&1 | systemd-cat -t "`basename $0`" -p debug