Support the ongoing development of Laravel.io →
posted 9 years ago
Queues

Hi,

I currently use Database driver for Queues, Laravel 5.1.

A client posts a request (time-consuming) and the server inserts a job to the queue.

The client should see "Processing..." until the job has finished, it can be either failure or success.

  • How does the workflow happens where the Server notifies the Client?

I'm thinking of holding another database table for managing my jobs ("jobs" and "failed_jobs" have no key relations!) and insert data to it from Job::failing() and the callback when job succeeds (any function?), by assigning a job ID that I give to the client and the client can poll on Job status after, where the server looks for job status in the custom table.

But, all this seems to me too much and I might be reinventing the wheel, didn't even mention web sockets!

What are the best practice to solve this?

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

NizarBlond nizarblond Joined 23 Oct 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.