alg_recsys_rank_item_realtime_1hroot_task.sh 851 B

12345678910111213141516171819202122
  1. source /etc/profile
  2. echo $ROV_OFFLINE_ENV
  3. if [ ! -d "my_logs_feature" ]; then
  4. mkdir my_logs_feature
  5. fi
  6. cur_time="`date +%Y%m%d`"
  7. cur_h="`date +%H`"
  8. echo "开始执行时间:{$(date "+%Y-%m-%d %H:%M:%S")}"
  9. if [[ $ROV_OFFLINE_ENV == 'test' ]]; then
  10. /root/anaconda3/bin/python alg_recsys_rank_item_realtime_1hroot.py $cur_time $cur_h
  11. elif [[ $ROV_OFFLINE_ENV == 'pro' ]]; then
  12. /root/anaconda3/bin/python alg_recsys_rank_item_realtime_1hroot.py $cur_time $cur_h
  13. if [ $? -ne 0 ]; then
  14. msg="写redis的任务,累积曝光/分享/回流到redis,用于排序,alg_recsys_rank_item_realtime_1hroot.py:${cur_time}-${cur_h}-something-is-wrong."
  15. /root/anaconda3/bin/python write_redis/utils_monitor.py ${msg}
  16. fi
  17. fi
  18. echo "结束执行时间:{$(date "+%Y-%m-%d %H:%M:%S")}"
  19. echo "all done"
  20. #sh alg_recsys_rank_item_realtime_1hroot_task.sh