123456789101112131415161718192021222324252627282930313233343536 |
- """
- @author: luojunhui
- """
- import traceback
- from applications import bot
- from coldStartTasks.filter.title_similarity_task import ColdStartTitleSimilarityTask
- if __name__ == '__main__':
- batch_size = 3000
- task = ColdStartTitleSimilarityTask()
- task.init_database()
- # 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}"
- }
- )
|