liqian 2 years ago
parent
commit
7330bee9fd
1 changed files with 2 additions and 2 deletions
  1. 2 2
      update_common_words.py

+ 2 - 2
update_common_words.py

@@ -19,9 +19,9 @@ def add_words2mysql(sheet_name, source):
     words = list(set(words))
     log_.info(f"words count = {len(words)}")
     # 批量插入到mysql
-    for i in range(len(words)//100+1):
+    for i in range(len(words)//50+1):
         log_.info(f"i = {i}")
-        words_list = words[i*100:(i+1)*100]
+        words_list = words[i*50:(i+1)*50]
         if len(words_list) > 0:
             # 与数据库中的数据去重
             select_sql = f"select word from word.hot_word where word in {tuple(words_list)}"