Closed gasparyanyur closed 6 years ago
should use:
$job = JobStatus::where('job_id', $id)->first();
instead, the id of jobstatus is not the same as job
This library do not intend to provide UI/API, as they will be too application-specific. You should use JobStatus model to make further use of the information collected.
You need to send de progress with broadcast into the Job[queue] It's more easy use vue instance of jQuery
In this example the job receives the list of ids to sync from external system to Laravel
Creating job Pass list the Ids to process sync or your data to process but its may have the total data to process
Job to process
And the event emiter
And into vue component to show the progress and catch broadcast progress
I am sending an ajax request to make a job to delete a folder tree. In FolderTreeJob I have a code look like this
Than I am sending an ajax request to chekc a job status (get the progress_now value). My controller code is
$job = JobStatus::find($id)
But the$job
is alwaysnull
, but I have checked db, there is a row with id (for example id =1)