The Storvia\Vantage\Facades\Vantage facade allows you to interact with queue monitoring data directly from your application code.
Common Methods
queueDepth(?string $queue = null): Returns queue depths for all or a specific queue.failedJobs(int $limit = 50): Retrieves a list of failed jobs.jobsByTag(string $tag, int $limit = 50): Retrieves jobs filtered by a specific tag.statistics(?string $startDate = null): Returns an array of statistics (total, processed, failed, processing, success_rate).retryJob(int $jobId): Retries a specific failed job.cleanupStuckJobs(int $hoursOld = 24): Cleans up jobs stuck in 'processing' state.pruneOldJobs(int $daysOld = 30): Deletes old job records from the database.enable() / disable() / enabled(): Controls the package state.
use Storvia\Vantage\Facades\Vantage;
// Get queue depth for all queues
$depths = Vantage::queueDepth();
// Get failed jobs
$failedJobs = Vantage::failedJobs(limit: 100);
// Get jobs by tag
$emailJobs = Vantage::jobsByTag('email', limit: 50);
// Get statistics
$stats = Vantage::statistics(startDate: now()->subDays(7));
// Returns: ['total' => 1000, 'processed' => 950, 'failed' => 50, 'processing' => 0, 'success_rate' => 95.0]
// Retry a failed job programmatically
Vantage::retryJob($jobId);
// Clean up stuck jobs older than 24 hours
$cleaned = Vantage::cleanupStuckJobs(hoursOld: 24);
// Prune old jobs
$deleted = Vantage::pruneOldJobs(daysOld: 30);
// Check if Vantage is enabled
if (Vantage::enabled()) {
// Monitor critical jobs
}