wesmiler 1 year ago
parent
commit
b634b6a386
2 changed files with 32 additions and 32 deletions
  1. 16 16
      app/Console/Commands/SwooleTask.php
  2. 16 16
      app/Console/Commands/WalletTask.php

+ 16 - 16
app/Console/Commands/SwooleTask.php

@@ -166,22 +166,22 @@ class SwooleTask extends Command
             return false;
         }
 
-        if ($smooth) {
-            \Swoole\Process::kill($masterPid, SIGTERM);
-            try {
-                while (true) {
-                    \Swoole\Process::kill($masterPid, 0);
-                }
-            } catch (\Exception $exception) {
-
-            }
-        } else {
-            \Swoole\Process::kill($masterPid, SIGKILL);
-        }
-
-        if($managePid){
-            \Swoole\Process::kill($managePid, SIGKILL);
-        }
+//        if ($smooth) {
+//            \Swoole\Process::kill($masterPid, SIGTERM);
+//            try {
+//                while (true) {
+//                    \Swoole\Process::kill($masterPid, 0);
+//                }
+//            } catch (\Exception $exception) {
+//
+//            }
+//        } else {
+//            \Swoole\Process::kill($masterPid, SIGKILL);
+//        }
+//
+//        if($managePid){
+//            \Swoole\Process::kill($managePid, SIGKILL);
+//        }
 
         // 直接杀
         $stoSh = base_path().'/crontab/swooleTaskStop.sh';

+ 16 - 16
app/Console/Commands/WalletTask.php

@@ -167,22 +167,22 @@ class WalletTask extends Command
             return false;
         }
 
-        if ($smooth) {
-            \Swoole\Process::kill($masterPid, SIGTERM);
-            try {
-                while (true) {
-                    \Swoole\Process::kill($masterPid, 0);
-                }
-            } catch (\Exception $exception) {
-
-            }
-        } else {
-            \Swoole\Process::kill($masterPid, SIGKILL);
-        }
-
-        if($managePid){
-            \Swoole\Process::kill($managePid, SIGKILL);
-        }
+//        if ($smooth) {
+//            \Swoole\Process::kill($masterPid, SIGTERM);
+//            try {
+//                while (true) {
+//                    \Swoole\Process::kill($masterPid, 0);
+//                }
+//            } catch (\Exception $exception) {
+//
+//            }
+//        } else {
+//            \Swoole\Process::kill($masterPid, SIGKILL);
+//        }
+//
+//        if($managePid){
+//            \Swoole\Process::kill($managePid, SIGKILL);
+//        }
 
         // 直接杀
         $stoSh = base_path().'/crontab/walletTaskStop.sh';