source /etc/profile
echo $ROV_OFFLINE_ENV
if [ ! -d "my_logs_feature" ]; then
    mkdir my_logs_feature
fi
cur_time="`date +%Y%m%d`"
cur_h="`date +%H`"
echo "开始执行时间:{$(date "+%Y-%m-%d %H:%M:%S")}"

if [[ $ROV_OFFLINE_ENV == 'test' ]]; then
  /root/anaconda3/bin/python alg_recsys_rank_item_realtime_1hroot.py $cur_time $cur_h
elif [[ $ROV_OFFLINE_ENV == 'pro' ]]; then
  /root/anaconda3/bin/python alg_recsys_rank_item_realtime_1hroot.py $cur_time $cur_h
  if [ $? -ne 0 ]; then
    msg="写redis的任务，累积曝光/分享/回流到redis，用于排序，alg_recsys_rank_item_realtime_1hroot.py:${cur_time}-${cur_h}-something-is-wrong."
    /root/anaconda3/bin/python write_redis/utils_monitor.py ${msg}
  fi
fi
echo "结束执行时间:{$(date "+%Y-%m-%d %H:%M:%S")}"
echo "all done"

#sh alg_recsys_rank_item_realtime_1hroot_task.sh