import jsonpath,requests,os,re,json,sys,traceback,datetime,random,time,itertools
from pymongo import MongoClient
from collections import defaultdict
import uuid as codeuuid
cur_dir=os.path.dirname(os.path.abspath(__file__))
project_dir=os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
data_file_path=os.path.join(project_dir,'dataFile')
timenow = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())
#sys.path.append(os.path.abspath(__file__))
channel = [214, 217, 1]
mysql_info={
    "119":{
        #'root', 'quantGroup#com', '172.24.17.119', 15307
        "name":"root",
        "pwd":"quantGroup#com",
        "host":"172.24.17.119",
        "port":"15307"
    },

    "220":{
        "name":"recommender_user_rw",
        "pwd":"rkwnPEG4",
        "host":"172.30.220.11",
        "port":"15307"
    },
    "saas5":{
        "name":"root",
        "pwd":"123456",
        "host":"172.29.2.5",
        "port":"3306"
    },
    "saas16":{
        "name":"root",
        "pwd":"root",
        "host":"172.29.5.16",
        "port":"3306"
    },
    "8066_27":{
        "name":"real_data_test",
        "pwd":"qpRBSarm$Tv*YO!n",
        "host":"off-line-db.quantgroups.com",
        "port":"8066"
    },
    "7438_27":{
        "name":"xyqb_recommender_system_w",
        "pwd":"Qa6pxybKE8KgsUGV",
        "host":"off-line-db.quantgroups.com",
        "port":"7438"
    },
    "nearly":{
        "name":"nearlinerds",
        "pwd":"3^4f=GZeA$",
        "host":"recommend-nearline-prod-5-7.cr22rydq7l0o.rds.cn-north-1.amazonaws.com.cn",
        "port":"3306"
    },
    "89":{
        "name":"root",
        "pwd":"123456",
        "host":"172.16.9.89",
        "port":"3306"
    },
    "feature_aliyun":{
        "host":"aliyun-test.mysql.rds.aliyuncs.com",
        "pwd":"NaL7F7j522Kn8D5kJz",
        "name":"tjzimu_test",
        "port":"3306"

    },
    #mysql+pymysql://xyqb_recommender:vxVFCgWTKjYb0xfR@rm-2ze1l8mi94dkd255c.mysql.rds.aliyuncs.com:3306/xyqb_recommender_system?charset=utf8
    "online":{
        "host":"rm-2ze1l8mi94dkd255c.mysql.rds.aliyuncs.com",
        "pwd":"vxVFCgWTKjYb0xfR",
        "name":"xyqb_recommender",
        "port":"3306"
    },
    "usergroup":{
        "name":"tjzimuali_test",
        "pwd":"bYut032QgkJ7ElMXwW",
        "host":"aliyun-test.mongodb.rds.aliyuncs.com:3717,dds-2ze3634f3b850e642.mongodb.rds.aliyuncs.com",
        "port":"3717"
        # mongodb://tjzimuali_test:bYut032QgkJ7ElMXwW@aliyun-test.mongodb.rds.aliyuncs.com:3717,dds-2ze3634f3b850e642.mongodb.rds.aliyuncs.com:3717/admin?replicaSet=mgset-58488296
    }
}

mongo_info={

}