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