You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.
Queued job chains are super useful for processing in stages. What I think is missing is a way of each job in the chain knowing something from the previous job.
In my current use case I have a pipeline of file processing:
file gets decoded (via external API - takes time)
decoded file gets processed (another API)
processed file gets encoded (coding API)
Passing each file down the stages of the chain would be really useful. Receiving the returned result form one job in the handle() method of the next maybe? Something like:
// controllerBus::chain([
newProcessPodcast($file),
newOptimizePodcast,
newReleasePodcast,
])->dispatch();
// ProcessPodcast.phppublicfunctionhandle()
{
...return$file;
}
// OptimizePodcast.phppublicfunctionhandle($file)
{
// do something with $file
}
Another option would be receiving the previous job instance itself? Maybe on $this->getPreviousJob() or something (this a terrible method name but you know what I mean)
The text was updated successfully, but these errors were encountered:
@rognales It might just be too early in the morning, but I don't understand how that package adds over normal queueable jobs.
I'd still need to dispatch each job in the chain from within the current job (i.e. not really using a chain as such, but dispatching jobs within jobs - not what I want).
In my use case the number and type of jobs in the chain change depending on the type of file (e.g some do no need decoding, they use different coding or processing API's etc..) so having each job independent is important.
Just passing the result of each job onto the next in the chain would be ideal.
Queued job chains are super useful for processing in stages. What I think is missing is a way of each job in the chain knowing something from the previous job.
In my current use case I have a pipeline of file processing:
Passing each file down the stages of the chain would be really useful. Receiving the returned result form one job in the
handle()
method of the next maybe? Something like:Another option would be receiving the previous job instance itself? Maybe on
$this->getPreviousJob()
or something (this a terrible method name but you know what I mean)The text was updated successfully, but these errors were encountered: