load EQT md to GPUshnik fix
This commit is contained in:
parent
9d9b9c17f6
commit
e192766c9a
@ -1 +1 @@
|
|||||||
1.5.1A,md checklists
|
1.5.2,load EQT md to GPUshnik fix
|
||||||
|
|||||||
@ -90,7 +90,6 @@ TargetFilePath="${TargetDir}/${TargetFile}"
|
|||||||
mv ${TargetFilePath} "${TargetFilePath}.saved.$(${date} '+%Y%m%d_%H%M%S')"
|
mv ${TargetFilePath} "${TargetFilePath}.saved.$(${date} '+%Y%m%d_%H%M%S')"
|
||||||
touch ${TargetFilePath}
|
touch ${TargetFilePath}
|
||||||
|
|
||||||
|
|
||||||
# ---- temp dir
|
# ---- temp dir
|
||||||
echo ${SourceFile}
|
echo ${SourceFile}
|
||||||
tmp_dir=$(mktemp -d)
|
tmp_dir=$(mktemp -d)
|
||||||
@ -136,12 +135,19 @@ function download_file {
|
|||||||
Cmd="${Cmd} ${SourceUser}@${SourceHost}:${SourceFilePath} ${tmp_dir}/"
|
Cmd="${Cmd} ${SourceUser}@${SourceHost}:${SourceFilePath} ${tmp_dir}/"
|
||||||
echo ${Cmd}
|
echo ${Cmd}
|
||||||
eval ${Cmd}
|
eval ${Cmd}
|
||||||
|
|
||||||
|
if [[ ! -f ${tmp_dir}/${SourceFileZip} ]] ; then
|
||||||
|
echo "File ${SourceUser}@${SourceHost}:${SourceFilePath} is missing. Skipped."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
ls -lh ${tmp_dir}
|
ls -lh ${tmp_dir}
|
||||||
Cmd="gunzip ${tmp_dir}/${SourceFileZip}"
|
Cmd="gunzip ${tmp_dir}/${SourceFileZip}"
|
||||||
echo ${Cmd} && eval ${Cmd}
|
echo ${Cmd} && eval ${Cmd}
|
||||||
|
|
||||||
DbFile=${tmp_dir}/${SourceFile}
|
DbFile=${tmp_dir}/${SourceFile}
|
||||||
|
|
||||||
|
|
||||||
# --- T E M P - for files older than 20240813
|
# --- T E M P - for files older than 20240813
|
||||||
sqlite3 ${DbFile} <<EOF
|
sqlite3 ${DbFile} <<EOF
|
||||||
DROP INDEX md_1min_bars_idx;
|
DROP INDEX md_1min_bars_idx;
|
||||||
@ -149,7 +155,7 @@ CREATE UNIQUE INDEX IF NOT EXISTS md_1min_bars_idx on md_1min_bars(tstamp, excha
|
|||||||
EOF
|
EOF
|
||||||
# --- T E M P
|
# --- T E M P
|
||||||
|
|
||||||
Cmd="sqlite3 ${DbFile} \".dump ${table}\" | sqlite3 ${TargetFilePath}"
|
Cmd="sqlite3 ${DbFile} \".dump\" | sqlite3 ${TargetFilePath}"
|
||||||
echo ${Cmd}
|
echo ${Cmd}
|
||||||
eval ${Cmd}
|
eval ${Cmd}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user