1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #!/bin/bash
- source ~/.bash_profile
- source ~/.bashrc
- conda activate tf2
- cd /data/SimRecall
- #1. download data
- nowday=`date +"%Y%m%d" -d -0days`
- last7day=`date +"%Y%m%d" -d -15days`
- echo ${nowday}
- echo ${last7day}
- mkdir -p ./data/
- mkdir -p ./logs/
- #conda activate py36
- nowhour=`date +"%Y%m%d%H" -d -0days`
- nowstart=$nowday'000000'
- nowhour=${nowhour}'0000'
- #nowhour='20230601140000'
- echo $nowhour
- echo ${nowstart}
- echo ${last7day}
- python extract_cur_share_log.py ${nowstart} ${nowhour}
- if [ $? -ne 0 ];
- then
- msg = "[ERROR] simrecall extract_share_log"
- sh sendmsg.sh $nowday $msg
- echo "[ERROR] echo 'extract_share_log"
- exit 255
- fi
- python filter_video.py ./data/user_cur_day_item_share_${nowhour} ./data/user_cur_day_item_share_filter_${nowhour}
- #python extract_share_log.py ${last7day} ${nowday}
- if [ $? -ne 0 ];
- then
- msg = "[ERROR] simrecall extract_share_log"
- sh sendmsg.sh $nowday $msg
- echo "[ERROR] echo 'extract_share_log"
- exit 255
- fi
- #nowday='20230505'
- #2. cal i2i result
- python calI2I2.py ${nowday} ${nowhour}
- if [ $? -ne 0 ];
- then
- msg = "[ERROR] simrecall calI2I.py"
- #sh sendmsg.sh $nowday $msg
- echo $msg
- exit -1
- fi
- #3.import res
- python import_redist.py "./data/rec_result3_"${nowhour}".json" "./data/redis_cls_"${nowhour}".json"
- if [ $? -ne 0 ];
- then
- msg = "[ERROR] simhot recall import_redist.py"
- sh sendmsg.sh $nowday $msg
- echo $msg
- exit -1
- fi
- echo 'finish sorted'
|