Hi trevorovert,
I have a similar setup using L5.1 and my job classes also implements SelfHandling.
class DataProcessing extends Job implements SelfHandling, ShouldQueue
I am not sure if this would be useful, but I also don't pass a request object to instances of my job classes. I use the request data in my controller to create an instance of the object model, which I then pass through as a serialized object onto the job queue. This all runs in the background, with each job's execution time averaging between 45 seconds to a minute and a half, and my controller redirects the client to a status view to monitor progress, pretty much instantly.
I also use the DispatchesJobs trait in my controller
use DispatchesJobs;
Also, I have a delay on my dispatch call in my controller, to allow the front-end to load before firing off the job:
// Dispatch Job $this->dispatch((new DetaProcessing($object)) ->onQueue('process-data-queue') ->delay(5));
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community