LD 5 gadi atpakaļ
vecāks
revīzija
009b4ee05c
2 mainītis faili ar 11 papildinājumiem un 10 dzēšanām
  1. 9 8
      app/Exceptions/Handler.php
  2. 2 2
      runServes.sh

+ 9 - 8
app/Exceptions/Handler.php

@@ -55,15 +55,16 @@ class Handler extends ExceptionHandler
      */
     public function render($request, Throwable $exception)
     {
-//        if ($exception instanceof HttpException) {
-        $code = $exception->getStatusCode();
-        Controller::logS('exception',$code,$exception->getTraceAsString().'|| ||'.json_encode($request->all()));
-        switch ($code){
-            case 419:return response()->view('exception.login');
-            case 404:return response()->view('exception.404');
-            default: return response()->view('exception.default',compact('code'));
+        if ($exception instanceof HttpException) {
+            $code = $exception->getStatusCode();
+            Controller::logS('exception',$code,$exception->getTraceAsString().'|| ||'.json_encode($request));
+            switch ($code){
+                case 419:return response()->view('exception.login');
+                case 404:return response()->view('exception.404');
+                default: return response()->view('exception.default',compact('code'));
+            }
         }
-//        }
+        Controller::logS('exception',class_basename($exception),$exception->getTraceAsString().'|| ||'.json_encode($request));
         return parent::render($request, $exception);
     }
 }

+ 2 - 2
runServes.sh

@@ -1,9 +1,8 @@
-#!/bin/sh
+
 ps -aux|grep laravel-echo-server |grep -v grep|awk '{print $2}'|xargs kill
 ps -aux|grep artisan |grep -v grep|awk '{print $2}'|xargs kill
 
 nohup laravel-echo-server start >/dev/null 2>&1 &
-
 nohup php artisan queue:work --tries=2 --delay=2 >/dev/null 2>&1 &
 nohup php artisan queue:work --tries=2 --delay=2 >/dev/null 2>&1 &
 nohup php artisan queue:work --tries=2 --delay=2 >/dev/null 2>&1 &
@@ -21,3 +20,4 @@ if [ ! -n "$isExistStr" ]; then
 echo -e '\n* * * * * root cd /var/www_test/was && php artisan schedule:run >> /dev/null 2>&1' >> /etc/crontab
 fi
 systemctl restart crond
+