wugg 2 years ago
parent
commit
2466d938a7
1 changed files with 4 additions and 3 deletions
  1. 4 3
      app/command/Report.php

+ 4 - 3
app/command/Report.php

@@ -39,11 +39,12 @@ class Report extends Command
 		$info = Cache::store('redis')->handler()->rpop($this->key);
 
 		if ($info==false) return '';
-		$info = json_decode($info,true);
-	    ini_set ('memory_limit', '512M') ;
-        $date=date("Y-m-d H:i:s");
+
         Db::startTrans();
         try{
+        $info = json_decode($info,true);
+	    ini_set ('memory_limit', '512M') ;
+        $date=date("Y-m-d H:i:s");
         $param = Db::name("exec_log")->where("id",$info['id'])->findOrEmpty();
         if(isset($param) && !empty($param)){
         if($param['is_del']==1) throw new \Exception("脚本记录已删除");