def flushTopicDetailpageDesc(self, strategy_id): data_desc2 = DataDesc() data_desc2.setSchema(SCHEMA.schema_topic_manage) data_desc2.setDataType(DATATYPE.data_type_query_topic_media_by_strategy) data_desc2.setKey(1, strategy_id) data_desc2.setCached(True, 600) return data_desc2
def flushTopicDetailpageDesc(self, strategy_id): data_desc2 = DataDesc() data_desc2.setSchema(SCHEMA.schema_topic_manage) data_desc2.setDataType( DATATYPE.data_type_query_topic_media_by_strategy) data_desc2.setKey(1, strategy_id) data_desc2.setCached(True, 600) return data_desc2
def flushTopicListDesc(self): data_desc2 = DataDesc() data_desc2.setSchema(SCHEMA.schema_topic_category) data_desc2.setDataType(DATATYPE.data_type_query_all) data_desc2.setCached(True, 600) return data_desc2
import os from itertools import permutations from string import ascii_uppercase from df import data_function from df.datamodel.schema import SCHEMA from df.datamodel.schema import DATATYPE from df.data_descriptor import DataDesc x3 = permutations(ascii_uppercase, r=3) x2 = permutations(ascii_uppercase, r=2) x1 = permutations(ascii_uppercase, r=1) data_desc = DataDesc(SCHEMA.schema_search, DATATYPE.data_type_query_all) data_desc.setCached(True) for x in x1: key = "".join(x) params = {"start": '0', "rows": '200', "type": '0', "search_key": key} print "processing key ", key data_desc.setKey(1, params) data_function.db_get(data_desc) for x in x2: key = "".join(x) params = {"start": '0', "rows": '200', "type": '0', "search_key": key} print "processing key ", key data_desc.setKey(1, params) data_function.db_get(data_desc)
from itertools import permutations from string import ascii_uppercase from df import data_function from df.datamodel.schema import SCHEMA from df.datamodel.schema import DATATYPE from df.data_descriptor import DataDesc x3 = permutations(ascii_uppercase, r=3) x2 = permutations(ascii_uppercase, r=2) x1 = permutations(ascii_uppercase, r=1) data_desc = DataDesc(SCHEMA.schema_search, DATATYPE.data_type_query_all) data_desc.setCached(True) for x in x1: key = "".join(x) params = {"start": '0', "rows": '200', "type": '0', "search_key": key} print "processing key ", key data_desc.setKey(1, params) data_function.db_get(data_desc) for x in x2: key = "".join(x) params = {"start": '0',