git 2 years ago
parent
commit
4146133e99
1 changed files with 9 additions and 3 deletions
  1. 9 3
      Home/Lib/Action/ListeningFileCreateAction.class.php

+ 9 - 3
Home/Lib/Action/ListeningFileCreateAction.class.php

@@ -139,7 +139,6 @@ class ListeningFileCreateAction extends Action {
 			    DahuaUtil::rlog('redis连接异常',$e->getMessage());
 		}
 						
-						
 				$i=0;
 			   $f=0;
 				DahuaUtil::rlog('开始扫描文件');
@@ -184,7 +183,14 @@ class ListeningFileCreateAction extends Action {
 				DahuaUtil::rlog('解压文件失败,进行跳过');
 				continue;
 			}
-		
+				if(!file_exists($res))
+				{
+					DahuaUtil::rlog('解压中的文件不存在');
+					unlink($res);
+					$res1=str_replace(".dat",".md5",$res);
+					unlink($res1);
+					continue;
+				}
 		
 					$f++;
 				   $start_time = microtime(true);
@@ -232,7 +238,7 @@ class ListeningFileCreateAction extends Action {
 				   }
 							
 							
-					DahuaUtil::rlog('传送kafaka文件成功:'.$res);
+					DahuaUtil::rlog('kafaka文件成功:'.$res);
 					$end_time = microtime(true);
 					$res1=str_replace(".dat",".md5",$res);
 					unlink($res);