Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add Laravel queue support #379

Merged
merged 6 commits into from
May 29, 2024
Merged

Feat: Add Laravel queue support #379

merged 6 commits into from
May 29, 2024

Conversation

KIKOmanasijev
Copy link
Contributor

This PR adds support for Laravel Queue.

How it works:

  • Set queue driver to "database" in config/queue.php.
  • Create the appropriate migrations with wp acorn queue:table and then run the migrations with wp acorn migrate.
  • Create a dummy Job with wp acorn make:job TestJob.
  • Dispatch the job from somewhere with TestJob::dispatch().
  • Run a queue worker with wp acorn queue:work.
  • Boom, you have a Laravel worker 馃コ

@Log1x
Copy link
Sponsor Member

Log1x commented May 26, 2024

Nice! Good to see it was an easy add. I figured it'd work since Livewire uses it (sync) but hadn't had time to look into console.

When you get a chance, can you run pint?

@KIKOmanasijev
Copy link
Contributor Author

Thanks @Log1x !

I just did it 馃殌

@Log1x
Copy link
Sponsor Member

Log1x commented May 26, 2024

Are you experiencing this issue at all? I thought it was maybe because I sorted the Kernel commands just now (without testing first) but reverting it (& clearing cache) I'm still getting an error when running any commands.

Screenshot

@KIKOmanasijev
Copy link
Contributor Author

Hey @Log1x, it seems I was using a cached hard-coded fix on my machine locally.

The problem was that \Illuminate\Queue\QueueServiceProvider::class was registering the Worker class under 'queue.worker', but later it attempts to resolve it under the fully qualified class name.

Let me know if it works now on your end.

@Log1x Log1x requested review from Log1x and QWp6t May 28, 2024 05:46
Copy link
Sponsor Member

@QWp6t QWp6t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@QWp6t QWp6t merged commit d945766 into roots:main May 29, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants