承接 digbang/safe-queue 相关项目开发

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

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

digbang/safe-queue

最新稳定版本:v1.1.0

Composer 安装命令:

composer require digbang/safe-queue

包简介

A Laravel Doctrine friendly daemonising queue worker for Laravel

README 文档

README

A Laravel Queue worker that's safe for use with Laravel Doctrine

When to use SafeQueue

  • You use Laravel 6 or up
  • You use Laravel Doctrine
  • Devops say the CPU usage of queue:listen is unacceptable
  • You want to do php artisan queue:work --daemon without hitting cascading EntityManager is closed exceptions

Compatibility

Version Supported Laravel Versions
0.1.* 5.1, 5.2
0.2.* ^5.3.16
0.3.* > 5.4 & <=5.8.*
0.4.* ^6.0 & ^7.0
0.5.* ^8.0

How it Works

SafeQueue overrides a small piece of Laravel functionality to make the queue worker daemon safe for use with Doctrine. It makes sure that the worker exits if the EntityManager is closed after an exception. For good measure it also clears the EM before working each job.

Installation

Install using composer

composer require digbang/safe-queue 

Once you've got the codez add the following to your service providers in app.php

Digbang\SafeQueue\DoctrineQueueProvider::class 
Lumen

Create the config file config/safequeue.php and load it: $app->configure('safequeue');

<?php return [ /* |-------------------------------------------------------------------------- | Worker Command Name |-------------------------------------------------------------------------- | | Configure the signature / name of the Work Command here. The default | is to rename the command to 'doctrine:queue:work', however you can | rename it to whatever you want by changing this value. | | To override the Laravel 'queue:work' command name just set this | to a false value or 'queue:work'. | */ 'command_name' => 'doctrine:queue:work', ]; 

Usage

php artisan doctrine:queue:work connection --daemon --sleep=3 --tries=3 ... 

All options are identical to Laravel's own queue:work method.

统计信息

  • 总下载量: 85.1k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 3
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 28
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固