PHP code example of tvup / redis-job-inspector
1. Go to this page and download the library: Download tvup/redis-job-inspector library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tvup / redis-job-inspector example snippets
use RedisQueue;
// All scheduled and running jobs on the default queue
$jobs = RedisQueue::jobs()->get();
// Scheduled jobs on the "emails" queue
$scheduled = RedisQueue::jobs()
->inQueue('emails')
->withJobState('Scheduled')
->get();
// Jobs of a specific class
$jobsOfClass = RedisQueue::jobs()
->withJobClass(\App\Jobs\SendEmail::class)
->get();
// Custom filters (e.g., displayName LIKE "%SendEmail%")
$filtered = RedisQueue::jobs()
->where('displayName', 'like', '%SendEmail%')
->where('job_state', '=', 'Running')
->get();