laravel / tinker

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

Explain issues of dispatching jobs from tinker. #61

Closed mkarnicki closed 6 years ago

mkarnicki commented 6 years ago

Resubmitting from laravel/docs PR.

I wasted half a day wondering why dispatching jobs wasn't working as expected. Turned out it was a combination of using tinker and the fact that dispatch method uses garbage collection to put jobs on the queue.

I filed this bug, which was closed, because two other where already filed concerning the same problem. Many people are wasting their time when faced with this problem, so it would make sense to document that "known subtlety" (citing Graham here).

Thanks.

michaeldyrynda commented 6 years ago

❤️ I've been struggling with this for so long and thought it had something weird to do with our queue setup at work