stanley-king 4 éve
szülő
commit
0bf40257c6
2 módosított fájl, 19 hozzáadás és 1 törlés
  1. 1 1
      helper/refill/policy/quaility.php
  2. 18 0
      mobile/mobile_run.php

+ 1 - 1
helper/refill/policy/quaility.php

@@ -64,7 +64,7 @@ class Quality
             Log::record("find_quality: cannot find any quality",Log::DEBUG);
             return [0,[]];
         }
-        
+
         if($time_out <= 0) {
             $time_out = $this->mSpeeds[$org]['retry_timeout'];
         }

+ 18 - 0
mobile/mobile_run.php

@@ -52,4 +52,22 @@ StatesHelper::init();
 $listener = new message\subscriber($gMessageStates);
 $listener->start();
 
+function sig_handler($signo)
+{
+    Log::record("queue quit at sig_handler.",Log::DEBUG);
+    switch($signo) {
+        case SIGINT:
+        case SIGHUP:
+        case SIGQUIT:
+        case SIGTERM:
+        default:
+            break;
+    }
+}
+
+pcntl_signal(SIGINT,  'sig_handler');
+pcntl_signal(SIGHUP,  'sig_handler');
+pcntl_signal(SIGQUIT, 'sig_handler');
+pcntl_signal(SIGTERM, 'sig_handler');
+
 fcgisrv\MobileServer::instance()->run_looper();