lundi 26 octobre 2015

How do I track progress on a queue job?

I am using the the database queue driver in laravel to run jobs in the background.

One of my jobs creates a given number (thousands to hundred thousands) records in the database. I wrapped the code for this job in a transaction so that in case the job failed, the database writes would not be commited.

Initially to track progress of the job, i thought i would count the number of created records, divide by total number of expected records then display that in a ui as percentage against each job such that users can know how much longer they have to wait.

This doesn't work because the tables are locked during the transaction.

Am wondering if anybody knows how track progress on a queued job



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire