load eqt to research - fix
This commit is contained in:
parent
bbfb7112bb
commit
edee6fc72c
@ -1 +1 @@
|
|||||||
1.6.1,trading recorder -> docker
|
1.6.2,load eqt to research - fix
|
||||||
|
|||||||
@ -9,6 +9,7 @@ usage() {
|
|||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ "$(uname)" == "Darwin" ]]; then
|
if [[ "$(uname)" == "Darwin" ]]; then
|
||||||
# macOS
|
# macOS
|
||||||
date='gdate'
|
date='gdate'
|
||||||
@ -22,6 +23,8 @@ host=homestore
|
|||||||
stocks=COIN,GBTC,SQ
|
stocks=COIN,GBTC,SQ
|
||||||
|
|
||||||
TargetDir="/opt/jupyter_gpu/data/eqty_md"
|
TargetDir="/opt/jupyter_gpu/data/eqty_md"
|
||||||
|
TargetDir="/tmp" # -------= D E B U G
|
||||||
|
|
||||||
mkdir -p ${TargetDir}
|
mkdir -p ${TargetDir}
|
||||||
|
|
||||||
Table=md_1min_bars
|
Table=md_1min_bars
|
||||||
@ -88,7 +91,6 @@ TargetFile=$(${date} -d ${md_date} "+%Y%m%d.eqty.mktdata.ohlcv.db")
|
|||||||
|
|
||||||
TargetFilePath="${TargetDir}/${TargetFile}"
|
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}
|
|
||||||
|
|
||||||
# ---- temp dir
|
# ---- temp dir
|
||||||
echo ${SourceFile}
|
echo ${SourceFile}
|
||||||
@ -146,6 +148,7 @@ function download_file {
|
|||||||
echo ${Cmd} && eval ${Cmd}
|
echo ${Cmd} && eval ${Cmd}
|
||||||
|
|
||||||
DbFile=${tmp_dir}/${SourceFile}
|
DbFile=${tmp_dir}/${SourceFile}
|
||||||
|
touch ${TargetFilePath}
|
||||||
|
|
||||||
|
|
||||||
# --- T E M P - for files older than 20240813
|
# --- T E M P - for files older than 20240813
|
||||||
@ -173,8 +176,10 @@ for stock in "${Stocks[@]}"; do
|
|||||||
download_file ${SourceFilePath}
|
download_file ${SourceFilePath}
|
||||||
done
|
done
|
||||||
|
|
||||||
chmod 600 ${TargetFilePath}
|
if [ -f ${TargetFilePath} ]; then
|
||||||
|
chmod 600
|
||||||
ls -lh ${TargetFilePath}
|
ls -lh ${TargetFilePath}
|
||||||
|
fi
|
||||||
|
|
||||||
# mkdir -p /tmp/aaa
|
# mkdir -p /tmp/aaa
|
||||||
# cp -r ${tmp_dir}/* /tmp/aaa/
|
# cp -r ${tmp_dir}/* /tmp/aaa/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user