-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"exception": "Non-static method VXM\\Async\\Async::run() should not be called statically", #10
Comments
Hi, Make sure you are using |
Thanks! Here is my complete new code : <?php
namespace App\Console\Commands;
use Async;
use VXM\Async\Invocation;
class MyTask
{
use Invocation;
public function handle()
{
return 1;
}
}
class test extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'test';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
Async::run(MyTask::class, [
'success' => function ($output) {
echo $output;
},
'error' => function (\Throwable $e) {
var_dump($e->getMessage()); die;
}
]);
return true;
}
} I'm getting an empty error each time :
Do you know why please? I can't get this piece of code to work :( |
Task should be PSR-4 named, can you rename and try again? |
Hello,
Whatever I do, your example gives me an error :
"exception": "Non-static method VXM\\Async\\Async::run() should not be called statically"
Here is my code based on your example :
Do you have any idea please ?
Is it possible to use all the functions of Laravel in the child process please?
PS : Is it also possible to keep the child process open while the parent process has not been completed?
Thank you
Val'
The text was updated successfully, but these errors were encountered: