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);
});
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire