justbetter/laravel-horizon-restarter 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

justbetter/laravel-horizon-restarter

最新稳定版本:1.0.0

Composer 安装命令:

composer require justbetter/laravel-horizon-restarter

包简介

Automatically restart Laravel Horizon

README 文档

README

Banner

Laravel Horizon Restarter

Tests Coverage Analysis Total downloads

Automatically restart Horizon after a given amount of jobs.

Why?

PHP is not designed for long running processes, it can sometimes run into issues when it has been running for too long. Horizon workers can automatically be stopped after processing a configured amount of jobs (maxjobs). However, depending on the balanceMaxShift and balanceCooldown, it may take a while before all processes are running again. This package will automatically restart Horizon gracefully after a given amount of jobs have been processed.

This package is to simplify configuration and to ensure that Horizon is restarted automatically.

Installation

You can install the package via composer:

composer require justbetter/laravel-horizon-restarter

Configuration

By default, after 100.000 jobs have been processed, Horizon will be terminated. This can be configured by adding the following to your .env file:

HORIZON_RESTARTER_THRESHOLD=100000

Quality

To ensure the quality of this package, run the following command:

composer quality

This will execute three tasks:

  1. Makes sure all tests are passed
  2. Checks for any issues using static code analysis
  3. Checks if the code is correctly formatted

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

JustBetter logo

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-06