I'm trying to automate some of my phpunit testing with a Laravel 5 Queues Job using Process in Symfony (and exec and a few other methods).
I am able to execute phpunit just fine but doing so throws the Queue into an infinite loop of:
[2016-03-28 18:04:58] Processed: Illuminate\Queue\CallQueuedHandler@call
[2016-03-28 18:04:59] Processed: Illuminate\Queue\CallQueuedHandler@call
[2016-03-28 18:04:59] Processed: Illuminate\Queue\CallQueuedHandler@call
[2016-03-28 18:04:59] Processed: Illuminate\Queue\CallQueuedHandler@call
[2016-03-28 18:05:00] Processed: Illuminate\Queue\CallQueuedHandler@call
I've tried several ways to execute phpunit, all seem to cause this issue. Doing a Process on a ls -al
or whoami
work just fine.
Any help would be appreciated.
namespace App\Jobs;
use App\Jobs\Job;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Symfony\Component\Process\Process;
class ProcessPHPUnit extends Job implements ShouldQueue
{
use InteractsWithQueue, SerializesModels;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$process = new Process('vendor/bin/phpunit', base_path());
$process->run();
}
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire