laravel / tinker

Powerful REPL for the Laravel framework.
https://laravel.com/docs/artisan#tinker
MIT License
7.32k stars 130 forks source link

First time i open tinker, i have to dispatch a job twice to get it pushed to queue #168

Closed ekstremedia closed 11 months ago

ekstremedia commented 11 months ago

Tinker Version

2.5

Laravel Version

8.83

PHP Version

8.2

Database Driver & Version

No response

Description

I have noticed that if i open php artisan tinker, to dispatch a job to test it, every first time i dispatch a job like this:

\App\Jobs\CreateDailyFamacStatistics::dispatch();

Nothing happens. If I do it one more time, the job is dispatched and added to queue. Right now this is happening on my reported versions but also on laravel 10 on other projects.

Subsequently they are dispatched every time i run the command. Its only the first time i start tinker i have to do it twice.

Steps To Reproduce

php artisan tinker dispatch a job

driesvints commented 11 months ago

Please see the docs here: https://laravel.com/docs/10.x/artisan#usage

Screenshot 2023-10-09 at 11 18 04