git 2 years ago
parent
commit
ae37be69e7

+ 3 - 4
Home/Lib/Action/InotifyMonitor.php

@@ -227,10 +227,9 @@ class InotifyMonitor {
              //扫描目录下所有没有上传到redis文件
              public function scan_file()
              {  
-                 echo '调用脚本'.PHP_EOL;
-                 
-                   //shell_exec("/home/wwwroot/nbfd_tp3/clear_file_redis.sh > /dev/null 2>&1 &");
-                  echo shell_exec("/home/wwwroot/nbfd_tp3/clear_file_redis.sh");
+                
+                   shell_exec("/home/wwwroot/nbfd_tp3/clear_file_redis.sh > /dev/null 2>&1 &");
+                 // echo shell_exec("/home/wwwroot/nbfd_tp3/clear_file_redis.sh");
                    return;
             }
             

+ 6 - 2
Home/Lib/Action/ListeningFileCreateAction.class.php

@@ -146,8 +146,12 @@ class ListeningFileCreateAction extends Action {
 		while(true)
 		{
 			$data=null;
-		
-			$res =  $redis->rPop($redis_key);
+			try{
+				 $res =  $redis->rPop($redis_key);	
+			}catch((Exception $e)
+		   {
+					DahuaUtil::rlog('redis取出数据异常'.$e->getMessage());
+			}
 		    if(!$res)
 			{
 				sleep(1);

+ 1 - 1
Home/Lib/Action/RouteRfidKafkaAction.class.php

@@ -212,7 +212,7 @@ class RouteRfidKafkaAction extends Action {
 							
 							$res=$this->addRfidDataToNingbo($data,$conn);
 							if(!$res['success']){
-								throw new \Exception('insert data to oracle false');
+								throw new \Exception($res['message']);
 							}
 		
 							 //$this->addRfidDataToRenlian($data);