From 78382df12d85ce70e848daa1bb652e6541e31465 Mon Sep 17 00:00:00 2001 From: Oleg Sheynin Date: Mon, 26 Aug 2024 16:59:01 -0400 Subject: [PATCH] load eqt to research - fix --- release_version.txt | 2 +- research/load_eqty_md.sh | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/release_version.txt b/release_version.txt index cb872c9..71e5324 100644 --- a/release_version.txt +++ b/release_version.txt @@ -1 +1 @@ -1.6.1,trading recorder -> docker +1.6.2,load eqt to research - fix diff --git a/research/load_eqty_md.sh b/research/load_eqty_md.sh index 8966fda..5ac622c 100755 --- a/research/load_eqty_md.sh +++ b/research/load_eqty_md.sh @@ -9,6 +9,7 @@ usage() { echo exit 1 } + if [[ "$(uname)" == "Darwin" ]]; then # macOS date='gdate' @@ -22,6 +23,8 @@ host=homestore stocks=COIN,GBTC,SQ TargetDir="/opt/jupyter_gpu/data/eqty_md" +TargetDir="/tmp" # -------= D E B U G + mkdir -p ${TargetDir} Table=md_1min_bars @@ -88,7 +91,6 @@ TargetFile=$(${date} -d ${md_date} "+%Y%m%d.eqty.mktdata.ohlcv.db") TargetFilePath="${TargetDir}/${TargetFile}" mv ${TargetFilePath} "${TargetFilePath}.saved.$(${date} '+%Y%m%d_%H%M%S')" -touch ${TargetFilePath} # ---- temp dir echo ${SourceFile} @@ -146,6 +148,7 @@ function download_file { echo ${Cmd} && eval ${Cmd} DbFile=${tmp_dir}/${SourceFile} + touch ${TargetFilePath} # --- T E M P - for files older than 20240813 @@ -173,8 +176,10 @@ for stock in "${Stocks[@]}"; do download_file ${SourceFilePath} done -chmod 600 ${TargetFilePath} -ls -lh ${TargetFilePath} +if [ -f ${TargetFilePath} ]; then + chmod 600 + ls -lh ${TargetFilePath} +fi # mkdir -p /tmp/aaa # cp -r ${tmp_dir}/* /tmp/aaa/