定制 christopherpeacock/laravel-job-watcher 二次开发

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

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

christopherpeacock/laravel-job-watcher

Composer 安装命令:

composer require christopherpeacock/laravel-job-watcher

包简介

A PHP Laravel Job Watcher to auto-restart queue worker on job file changes.

README 文档

README

Hot reload for Laravel Jobs — automatically restart your queue workers when job files change during development.

Problem

When working on Laravel Jobs, you often have to stop and restart the queue worker manually to see your code changes take effect. This repetitive process slows down development and wastes time.

Solution

Hot Reload for Laravel Jobs — inspired by JavaScript frameworks, this tool watches the app/Jobs directory and automatically restarts the Laravel queue worker whenever it detects PHP file changes. No more manual restarts; just code and watch your changes take effect immediately.

Installation

Install via composer:

composer require christopherpeacock/laravel-job-watcher

Usage

Run from your Laravel project root folder:

php vendor/christopherpeacock/laravel-job-watcher/bin/laravel-job-watcher.php

The watcher will:

  • Monitor the app/Jobs directory for any PHP file changes
  • Automatically restart the Laravel queue worker upon detecting changes
  • Print clear status messages to keep you informed
  • Keep your development workflow smooth and uninterrupted

Example Output

$ vendor/bin/laravel-job-watcher

Requirements

  • PHP 8.0 or higher
  • Laravel 9.0 or higher

How It Works

The job watcher uses file system events to monitor changes in your job files. When a change is detected:

  1. The current queue worker process is gracefully terminated
  2. A new queue worker is started automatically
  3. Your updated job code is now active without manual intervention

Development Benefits

  • Faster Development: No more manual queue worker restarts
  • Improved Workflow: Focus on coding, not process management
  • Real-time Testing: See your job changes immediately
  • Error Prevention: Avoid forgetting to restart workers

Credits

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固