diff --git a/app/Console/Commands/SwooleCallcenterRun.php b/app/Console/Commands/SwooleCallcenterRun.php index 91dfe544..85a2d8a8 100644 --- a/app/Console/Commands/SwooleCallcenterRun.php +++ b/app/Console/Commands/SwooleCallcenterRun.php @@ -142,7 +142,7 @@ class SwooleCallcenterRun extends Command break; } foreach ($calls as $call){ - go(function () use ($call,$task){ + \Swoole\Coroutine::create(function () use ($call,$task){ (new Callcenter($call,$task))->run(); }); sleep(2); diff --git a/app/Service/Callcenter.php b/app/Service/Callcenter.php index 4a9b945a..f944d853 100644 --- a/app/Service/Callcenter.php +++ b/app/Service/Callcenter.php @@ -112,7 +112,7 @@ class Callcenter $this->call->update([ 'billsec' => $billsec, ]); - break; + break 2; default: } }