Trackable Jobs for Laravel


April 16th, 2021

Trackable Jobs for Laravel

Trackable Jobs for Laravel is a package by Mateus Junges that allows you to track Laravel jobs in your database easily.

It works by adding the Trackable trait to a queue job class and stores things like job name, type, status, output, job start, and job finish timestamps. Here's an example of what it looks like

3namespace App\Jobs;
5use Illuminate\Bus\Queueable;
6use Illuminate\Contracts\Queue\ShouldQueue;
7use Illuminate\Foundation\Bus\Dispatchable;
8use Illuminate\Queue\InteractsWithQueue;
9use Illuminate\Queue\SerializesModels;
10use Junges\TrackableJobs\Traits\Trackable;
12class ProcessPodcastJob implements ShouldQueue
14 use Dispatchable, InteractsWithQueue, Queueable, SerializesModels, Trackable;
16 public function handle()
17 {
18 //
19 }

Lastly, this package enables you to track chained jobs as well. Check the readme for further details on working with chained jobs. You can learn more about this package, get full installation instructions, and view the source code on GitHub.

This package was submitted to our Laravel News Links section. Links is a place the community can post packages and tutorials around the Laravel ecosystem. Follow along on Twitter @LaravelLinks

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.