Example #1
0
 def update_words(cls):
     '''
     .执行刷新全网数据
     '''
     RedisKeyManager.clear_all_keyword_list(
         KeywordInfo.GKEYWORD_ALIAS, KeywordInfo.GDATA_KW_LIST_PREV_KEY)
     KeywordInfo.clean_gdata_timescope()
     KeywordInfo.get_gdata_timescope()
     result_list = []
     for key in KeywordInfo.r_keyword.lrange(
             RedisKeyManager.get_key_manager(), 0, -1):
         result_list.append(update_gdata_keyword.delay(key))
     total = len(result_list)
     cls.monitor_result(
         'update all keyword now len = %s and total len = %s', result_list)
     return total
Example #2
0
def get_timescope():
    return KeywordInfo.get_gdata_timescope()