mardi 24 novembre 2020

Is this Possible to run Multiple jobs in parallel?

We are using many of job in our project . But the problem is on some places we dispatch() queue in loop or database chunk() . But problem is when data is big almost 10000 it runs for hours . and All other jobs get paused for that time.

Is there Possible to run those 10000 jobs separately without disturbing other jobs?

Here is code for database queuery which is taking data in chunk which has 10000 records

Invoice::where('payment_status', 1)->chunk(1, function($invoices) {
        FillUpInChunkJob::dispatch($invoices);
            
        });


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3l7ZFck
via IFTTT

Aucun commentaire:

Enregistrer un commentaire