mardi 17 janvier 2017

Laravel multiple jobs dispatch?

Is there a way to do multiple dispatch?

In WaitUntilPosted job - dispatch(New ProcessOne); must be completed first before going to next job like dispatch(New ProcessTwo); These do not be in the queue, just run immediately.

If that not possible, sound like I need to use Event or Console Commands?

class WaitUntilPosted implements ShouldQueue
{
    public function handle()
    {
        // Do something ..

        if ($posted) {
            Log::info('Has posted...');

            dispatch(New ProcessOne);
            dispatch(New ProcessTwo);
            dispatch(New ProcessThree);
        }
    }
}



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2jHIgZf
via IFTTT

Aucun commentaire:

Enregistrer un commentaire