fabninjas/job-lens
最新稳定版本:v1.0.0
Composer 安装命令:
composer require fabninjas/job-lens
包简介
A package that provides a jobs analysis for the application.
README 文档
README
JobLens is a Laravel package that helps you track slow queue jobs and show analytics for every job in queue:work command it self.
Installation
Install the package via Composer:
composer require fabninjas/job-lens
Publish Files
Publish the migration and config files:
php artisan vendor:publish --tag=joblens-migrations php artisan vendor:publish --tag=joblens-config
Then run migration:
php artisan migrate
Usage
Detect Slow Jobs From View
http://your_base_app_url/slowjobs
Detect Slow Jobs Command
php artisan joblens:slowjobs
Start Queue Worker
Run queue worker to see analytics:
php artisan queue:work
How it works
- If a job has a timeout defined, JobLens considers it slow when it reaches 80% of that timeout
- If no timeout is defined, it uses a default value from config
Configuration
You can change settings in:
config/joblens.php
Example:
return [ // If job has timeout mentioned, then slow job threshold will be 80% of the timeout // Otherwise it will use the value below 'slow_job_threshold' => 2, // seconds // Track external API calls during job execution 'track_external_api' => true, ];
Features
- Detect slow queue jobs
- Auto calculate threshold based on timeout
- Track external API calls
- Simple Artisan command
- Easy integration
License
MIT License
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-25