| 
														
															@@ -514,6 +514,16 @@ class ConsumptionRecommend(object): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                         logger.error(f"删除文件时出错: {file_path}, 错误: {e}") 
														 | 
														
														 | 
														
															                         logger.error(f"删除文件时出错: {file_path}, 错误: {e}") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             return 
														 | 
														
														 | 
														
															             return 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    @classmethod 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    def unseal(cls): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        """解除封印,将上传完成但不能搜索的视频开放搜索""" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        max_score = int(datetime.now().strftime('%Y%m%d%H')) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        redis_name = 'task:carry_data_redis_finish' 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        tasks = RedisHelper().get_client().zrangebyscore(name=redis_name, min=0, max=max_score) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        for task in tasks: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            task_obj = orjson.loads(task) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            PQ.change_recommend_status(pq_vid=task_obj['pq_vid'], pq_uid=task_obj['pq_uid'], can_search=False) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            RedisHelper().get_client().zrem(redis_name, task) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 def run(): 
														 | 
														
														 | 
														
															 def run(): 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -521,6 +531,7 @@ def run(): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     try: 
														 | 
														
														 | 
														
															     try: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         logger.info(f"[处理] 开始启动") 
														 | 
														
														 | 
														
															         logger.info(f"[处理] 开始启动") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         scheduler.add_job(ConsumptionRecommend.run, trigger=IntervalTrigger(minutes=1))  # 每1分钟启动一次 
														 | 
														
														 | 
														
															         scheduler.add_job(ConsumptionRecommend.run, trigger=IntervalTrigger(minutes=1))  # 每1分钟启动一次 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        scheduler.add_job(ConsumptionRecommend.unseal(), trigger=IntervalTrigger(minutes=5))  # 每5分钟启动一次 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         scheduler.start() 
														 | 
														
														 | 
														
															         scheduler.start() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     except KeyboardInterrupt: 
														 | 
														
														 | 
														
															     except KeyboardInterrupt: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         pass 
														 | 
														
														 | 
														
															         pass 
														 |