承接 gilbitron/laravel-queue-monitor 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gilbitron/laravel-queue-monitor

Composer 安装命令:

composer require gilbitron/laravel-queue-monitor

包简介

A Laravel package to monitor queue jobs.

README 文档

README

A Laravel package to monitor queue jobs. Logs certain information about queue jobs in a database table:

  • The elapsed time of the job including start and finish timestamps
  • If --tries is being used the attempt number for each job
  • If the job failed and the exception given (if available)
  • Custom data (optional)

Requirements

  • Laravel 5.3+

Install

Install the composer package:

composer require gilbitron/laravel-queue-monitor

Add the service provider in config/app.php:

/*
 * Package Service Providers...
 */
Gilbitron\LaravelQueueMonitor\LaravelQueueMonitorProvider::class,

Run a migration to setup the queue_monitor database table:

php artisan migrate

Usage

All queue jobs will now be monitored and results stored to the queue_monitor database table. No other configuration is required.

Custom Data

To save custom data with the queue monitor results you need to include the QueueMonitorData trait in your Job and use the saveQueueMonitorData() method. For example:

<?php

namespace App\Jobs;

use Gilbitron\LaravelQueueMonitor\Jobs\QueueMonitorData;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;

class ExampleJob implements ShouldQueue
{
    use InteractsWithQueue, Queueable, SerializesModels, QueueMonitorData;

    protected $results = 0;

    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        $this->results = rand(1, 100);

        $this->saveQueueMonitorData([
            'results' => $this->results,
        ]);

        // ...
    }
}

Credits

Laravel Queue Monitor was created by Gilbert Pellegrom from Dev7studios. Released under the MIT license.

gilbitron/laravel-queue-monitor 适用场景与选型建议

gilbitron/laravel-queue-monitor 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11.79k 次下载、GitHub Stars 达 11, 最近一次更新时间为 2017 年 01 月 17 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「queue」 「monitor」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 gilbitron/laravel-queue-monitor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 gilbitron/laravel-queue-monitor 我们能提供哪些服务?
定制开发 / 二次开发

基于 gilbitron/laravel-queue-monitor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 11.79k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 10
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-01-17