|
@@ -1,11 +1,36 @@
|
|
|
"""
|
|
|
@author: luojunhui
|
|
|
"""
|
|
|
+import traceback
|
|
|
+from applications import bot
|
|
|
from coldStartTasks.filter.title_similarity_task import ColdStartTitleSimilarityTask
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
- batch_size = 1000
|
|
|
+ batch_size = 3000
|
|
|
task = ColdStartTitleSimilarityTask()
|
|
|
task.init_database()
|
|
|
- task.run(meta_source="article")
|
|
|
+ # process video
|
|
|
+ try:
|
|
|
+ task.run(meta_source="video")
|
|
|
+ except Exception as e:
|
|
|
+ bot(
|
|
|
+ title="视频冷启池nlp任务异常",
|
|
|
+ mention=False,
|
|
|
+ detail={
|
|
|
+ "traceback": traceback.format_exc(),
|
|
|
+ "error": f"{e}"
|
|
|
+ }
|
|
|
+ )
|
|
|
+ # process article
|
|
|
+ try:
|
|
|
+ task.run(meta_source="article")
|
|
|
+ except Exception as e:
|
|
|
+ bot(
|
|
|
+ title="文章冷启池nlp任务异常",
|
|
|
+ mention=False,
|
|
|
+ detail={
|
|
|
+ "traceback": traceback.format_exc(),
|
|
|
+ "error": f"{e}"
|
|
|
+ }
|
|
|
+ )
|