"newsctgy军事", "movibtqt搞笑", "movicate科幻", "movibtqt男女关系", "movicate战争", "movilikemoviI90ibmamO_f5birV", "movibtqt恋爱" ] for i in reasons: result = translate_reason(i) print result[0], result[1] if __name__ == "__main__": logging.basicConfig(level=logging.INFO, format="%(asctime)s %(name)s %(filename)s +%(lineno)d %(levelname)s %(message)s") import module.recommend.data_manage.model_interface as model db_conf = { 'db_name': 'alinow_zhijun', 'host': '10.250.12.84', 'passwd': '', 'user': '******', 'port': 3306, 'charset': 'utf8' } cache_conf = { 'host':'10.250.12.84', 'port':6379, } model.db_cache_init(db_conf, cache_conf) test_get_reason()
#-*- coding: utf8 -*- # created by zhijun.sunzj , 2013-05-16 import sys sys.path.append('.') import module.recommend.data_manage.cache_update_process as cache_update_process import module.recommend.data_manage.log_conf #cache_update_process.clear_online_cache() import module.recommend.data_manage.model_interface as model_interface model_interface.db_cache_init() print cache_update_process.cache_update_all_together(['movi', 'news'], ['movi'])