Pārlūkot izejas kodu

Merge branch 'wugg-dev' of wugg/phpstock into version1.5

wugg 2 gadi atpakaļ
vecāks
revīzija
616619b18b
1 mainītis faili ar 5 papildinājumiem un 4 dzēšanām
  1. 5 4
      app/command/NowReportHandle.php

+ 5 - 4
app/command/NowReportHandle.php

@@ -26,7 +26,8 @@ class NowReportHandle extends Command
     //处理报表预约记录,生成报表文件
     protected function execute(Input $input, Output $output)
     {
-    	    ini_set("memory_limit", "516M");
+    	    $now=date("Y-m-d H:i:s");
+    	    ini_set("memory_limit", "2048M");
             $info = Cache::store('redis')->handler()->rpop($this->key);
         try {
             if ($info) {
@@ -113,9 +114,9 @@ class NowReportHandle extends Command
                         'expiretime' => date('Y-m-d H:i:s', strtotime('+7 day'))
                     ]);
 
-                $output->writeln('【' . $info['id'] . '】该预约记录处理成功');
+                $output->writeln("[$now]".'【' . $info['id'] . '】该预约记录处理成功');
 
-            } else  $output->writeln('没有可供处理的报表预约记录');
+            }
 
         } catch (Exception $exception) {
         	Db::name('exec')
@@ -126,7 +127,7 @@ class NowReportHandle extends Command
 			        'updatetime' => date('Y-m-d H:i:s'),
 			        'expiretime' => date('Y-m-d H:i:s', strtotime('+7 day'))
 		        ]);
-            $output->writeln($exception->getMessage() . '|' . $exception->getFile() . '|' . $exception->getLine());
+            $output->writeln("[$now]".$exception->getMessage() . '|' . $exception->getFile() . '|' . $exception->getLine());
         }
 
     }