test.sh 995 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/bash
  2. source ~/.bash_profile
  3. source ~/.bashrc
  4. conda activate base
  5. #1. download data
  6. nowday=`date +"%Y%m%d" -d -0days`
  7. last7day=`date +"%Y%m%d" -d -8days`
  8. echo ${nowday}
  9. echo ${last7day}
  10. mkdir -p ./data/
  11. #python extract_share_log.py ${last7day} ${nowday}
  12. #if [ $? -ne 0 ];
  13. #then
  14. # msg = "[ERROR] simrecall extract_share_log"
  15. # sh sendmsg.sh $nowday $msg
  16. # echo "[ERROR] echo 'extract_share_log"
  17. # exit 255
  18. #fi
  19. #nowday='20230505'
  20. #2. cal i2i result
  21. #python calI2I.py ${nowday}
  22. #if [ $? -ne 0 ];
  23. #then
  24. # msg = "[ERROR] simrecall calI2I.py"
  25. # sh sendmsg.sh $nowday $msg
  26. # echo $msg
  27. # exit -1
  28. #fi
  29. #3.import res
  30. python import_redist.py "./data/rec_result_"${nowday}".json" "./data/redis_cls_"${nowday}".json"
  31. #python test.py "./data/rec_result_"${nowday}".json" './data/redis_cls_'${nowday}".json"
  32. #if [ $? -ne 0 ];
  33. #then
  34. # msg = "[ERROR] simhot recall import_redist.py"
  35. # sh sendmsg.sh $nowday $msg
  36. # echo $msg
  37. exit -1
  38. fi
  39. echo "finish sorted"