定制 vkoori/identifier-queue 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

vkoori/identifier-queue

最新稳定版本:1.1.1

Composer 安装命令:

composer require vkoori/identifier-queue

包简介

This package is created for dispatching queues that have a identifier field for searching.

关键字:

README 文档

README

composer require vkoori/identifier-queue

Register service providers

Luemn

Add this lines to bootstrap/app.php file.

$app->register(\Kooriv\Queue\Providers\QueueServiceProvider::class);

Laravel

For Laravel versions before 5.5 or if not using auto-discovery, register the service provider in config/app.php

Add connection to config/queue.php:

'identify' => [
    'driver' => 'identify',
    'table' => 'identify_jobs',
    'queue' => 'default',
    'retry_after' => 90,
    'after_commit' => false,
]

Create database table

php artisan queue:identifier-table

php artisan migrate

Note

This table is fully compatible with the Lumen/Laravel database driver. So don't be afraid when using this table.

Dispatching job

You can dispatch your jobs in the queue using the helper function below

dispatcher(new ExampleJob)->onConnection("identify")->onQueue("queue")->setIdentifier("identifier");

Note

If you want to set an identifierCode, your job must have use following trait:

use \Kooriv\Queue\Illuminate\Bus\Trait\IdentifierCode;

Note

Using this helper function will not cause any damage to other drivers.

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-04-15