fix and progress
This commit is contained in:
parent
2416ca4b0d
commit
4d42675569
@ -1 +1 @@
|
|||||||
0.6.4
|
0.6.5
|
||||||
@ -1,6 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
CalendarURL=http://cloud16.cvtt.vpn:8000/api/v1/markets/hours?mic=XNYS
|
Start=${1}
|
||||||
|
End=${2}
|
||||||
|
NumJobs=${3}
|
||||||
|
|
||||||
|
export CalendarURL=http://cloud16.cvtt.vpn:8000/api/v1/markets/hours?mic=XNYS
|
||||||
|
|
||||||
is_business_day() {
|
is_business_day() {
|
||||||
dt=${1}
|
dt=${1}
|
||||||
|
|
||||||
@ -14,13 +19,9 @@ is_business_day() {
|
|||||||
}
|
}
|
||||||
export -f is_business_day
|
export -f is_business_day
|
||||||
|
|
||||||
Start=${1}
|
|
||||||
End=${2}
|
|
||||||
NumJobs=${3}
|
|
||||||
|
|
||||||
if [ "${Start}" == "" ] ; then
|
if [ "${Start}" == "" ] ; then
|
||||||
echo "Usage: ${0} <start_date> [<end_date>] [<num_jobs> (25)]]"
|
Start=$(date -d "yesterday" "+%Y-%m-%d")
|
||||||
exit
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! is_business_day ${Start}; then
|
if ! is_business_day ${Start}; then
|
||||||
@ -39,12 +40,15 @@ fi
|
|||||||
echo "Start=${Start} End=${End} NumJobs=${NumJobs}"
|
echo "Start=${Start} End=${End} NumJobs=${NumJobs}"
|
||||||
|
|
||||||
|
|
||||||
Python=/home/cvtt/.pyenv/python3.10-venv/bin/python3
|
export PYTHONPATH=/home/cvtt/prod
|
||||||
PyScript=/home/cvtt/prod/cvttpy/exchanges/alpaca/hist_mkt_data.py
|
export Python=/home/cvtt/.pyenv/python3.10-venv/bin/python3
|
||||||
|
export PyScript=/home/cvtt/prod/cvttpy/exchanges/alpaca/hist_mkt_data.py
|
||||||
|
|
||||||
OutputDir=/home/cvtt/alpaca_md
|
export OutputDir=/home/cvtt/alpaca_md
|
||||||
Config=http://cloud16.cvtt.vpn:6789/apps/minimal_md
|
export Config=http://cloud16.cvtt.vpn:6789/apps/minimal_md
|
||||||
|
export LogDir=/home/cvtt/prod/logs/alpaca_md
|
||||||
|
|
||||||
|
mkdir -p ${LogDir}
|
||||||
|
|
||||||
run_proc() {
|
run_proc() {
|
||||||
Inst=${1}
|
Inst=${1}
|
||||||
@ -61,12 +65,11 @@ run_proc() {
|
|||||||
if [ "${End}" != "" ]; then
|
if [ "${End}" != "" ]; then
|
||||||
Cmd="${Cmd} --end=${End}"
|
Cmd="${Cmd} --end=${End}"
|
||||||
fi
|
fi
|
||||||
Cmd="${Cmd} --log_file=./logs/${Start}.${Inst}.log"
|
Cmd="${Cmd} --log_file=${LogDir}/${Start}.${Inst}.log"
|
||||||
echo ${Cmd}
|
echo ${Cmd}
|
||||||
eval ${Cmd}
|
eval ${Cmd}
|
||||||
}
|
}
|
||||||
|
|
||||||
export PYTHONPATH=/home/cvtt/prod
|
|
||||||
export -f run_proc
|
export -f run_proc
|
||||||
|
|
||||||
key=$(jq -r '.["ALPACA_SANDBOX"] | .api_key' ~/.creds)
|
key=$(jq -r '.["ALPACA_SANDBOX"] | .api_key' ~/.creds)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user