mardi 6 juin 2023

Dispatch on laravel 5.6 won't run function handle(), only run construct()

Hi i try to create queue job, using queue=redis in laravel 5.2 But i've checked using log, my job only run construct() not running handle()

can you suggest what's wrong?

my dispatch scheme like this :

Controller -> dispatch -> dispatch_now() -> dispatch_now()

here is my code :

class LogHelper implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    protected $transId;

    public function __construct(int $transId)
    {
        $this->transId = $transId;
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle(){
       //do code
    }
}

expecting of those job was running normally like normal job and code excuted



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/HgynI7t
via IFTTT

Aucun commentaire:

Enregistrer un commentaire