source /etc/profile
echo $ROV_OFFLINE_ENV
if [[ $ROV_OFFLINE_ENV == 'test' ]]; then
    cd /data2/rov-offline
    /root/anaconda3/bin/python /data2/rov-offline/recommend_region_data_status_update.py
    echo "recommend data status update to initial '0' finished!"
    nohup /root/anaconda3/bin/python /data2/rov-offline/rule_rank_h_by_24h.py &
    nohup /root/anaconda3/bin/python /data2/rov-offline/region_rule_rank_h_by24h.py &
    nohup /root/anaconda3/bin/python /data2/rov-offline/rule_rank_h_new.py &
#    while ps aux | grep "rule_rank_h_by_24h.py" | grep -v grep > /dev/null || ps aux | grep "region_rule_rank_h_by24h.py" | grep -v grep > /dev/null || ps aux | grep "rule_rank_h_new.py" | grep -v grep > /dev/null;
#    do
#      sleep 30
#    done
#    echo "24h, region_24h, h data update task finished!"
#    nohup /root/anaconda3/bin/python /data2/rov-offline/region_rule_rank_h.py '24h' &
    nohup /root/anaconda3/bin/python /data2/rov-offline/region_rule_rank_h_v2.py '24h' &
    nohup /root/anaconda3/bin/python /data2/rov-offline/recommend_region_data_dup.py '24h' &
#      /root/anaconda3/bin/python /data2/rov-offline/region_rule_rank_h_new.py
#      /root/anaconda3/bin/python /data2/rov-offline/laohaokan_recommend_update.py
elif [[ $ROV_OFFLINE_ENV == 'pro' ]]; then
    cd /data/rov-offline
    /root/anaconda3/bin/python /data/rov-offline/recommend_region_data_status_update.py
    echo "recommend data status update to initial '0' finished!"
    nohup /root/anaconda3/bin/python /data/rov-offline/rule_rank_h_by_24h.py &
    nohup /root/anaconda3/bin/python /data/rov-offline/region_rule_rank_h_by24h.py &
    nohup /root/anaconda3/bin/python /data/rov-offline/rule_rank_h_new.py &
#    while ps aux | grep "rule_rank_h_by_24h.py" | grep -v grep > /dev/null || ps aux | grep "region_rule_rank_h_by24h.py" | grep -v grep > /dev/null || ps aux | grep "rule_rank_h_new.py" | grep -v grep > /dev/null;
#    do
#      sleep 30
#    done
#    echo "24h, region_24h, h data update task finished!"
#    nohup /root/anaconda3/bin/python /data/rov-offline/region_rule_rank_h.py '24h' &
    nohup /root/anaconda3/bin/python /data/rov-offline/region_rule_rank_h_v2.py '24h' &
    nohup /root/anaconda3/bin/python /data/rov-offline/recommend_region_data_dup.py '24h' &
#      /root/anaconda3/bin/python /data/rov-offline/region_rule_rank_h_new.py
#      /root/anaconda3/bin/python /data/rov-offline/laohaokan_recommend_update.py
fi
