fidum/laravel-schedule-queue-command

提供从 Laravel 调度器中排队命令的能力。

1.0.2 2024-03-05 19:00 UTC

This package is auto-updated.

Last update: 2024-09-08 20:20:40 UTC


README

Latest Version on Packagist GitHub Workflow Status (with branch) Twitter Follow

向调度器添加一个 queueCommand 函数,该函数在给定的计划上执行 Artisan::queue(...) 的等效操作。它还提供可选的定制 queueconnection 的能力。

安装

您可以通过 composer 安装此包

composer require fidum/laravel-schedule-queue-command

用法

在您的 Laravel 项目中 app/Console/Kernel.php

$schedule->queueCommand(FooCommand::class)->everyMinute();
$schedule->queueCommand(FooCommand::class, ['some-argument' => 'foo']);
$schedule->queueCommand(FooCommand::class, ['some-argument' => 'foo'], 'queue');
$schedule->queueCommand(FooCommand::class, ['some-argument' => 'foo'], 'queue', 'connection');

测试

composer test

变更日志

请参阅 CHANGELOG 了解最近的变化信息。

贡献

请参阅 CONTRIBUTING 了解详细信息。

鸣谢

许可协议

MIT 许可协议 (MIT)。请参阅 许可文件 了解更多信息。