承接 valorin/l4-down-safe 相关项目开发

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

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

valorin/l4-down-safe

Composer 安装命令:

composer require valorin/l4-down-safe

包简介

Artisan command for switching a Laravel 4 queue worker into maintenance mode alongside the application safely.

README 文档

README

Artisan command for switching a Laravel 4 queue worker into maintenance mode alongside the application safely.

When running ./artisan down:safe, it will add a job into the queue and wait. When this job is processed, the application is taken down into maintenance mode and the queue worker remains looping that job - however command will finish so you can proceed with maintenance. Finally, when the application is brought back up with ./artisan up, the ./artisan queue:restart command is called and the job finishes, so the worker can listen to the restart command and stop (so it can restart).

If running ./artisan queue:listen, the listener will continue to operate throughout the process seamlessly. However, ./artisan queue:work --daemon will stop and need to be restarted.

Important: It only supports a single queue worker. For something more complicated, you will need a more powerful solution to manage workers.

Installation

Add the package to your application with composer:

composer require "valorin/l4-down-safe:~1.1"

Add the L4DownSafeServiceProvider service provider to the providers list in ./app/config/app.php:

'providers' => array(
    ...
    'Valorin\L4DownSafe\L4DownSafeServiceProvider',
),

Usage

When ready to switch the application into maintenance mode, run:

./artisan down:safe

When the script finishes executing, the application is in maintenance mode. When ready to take it back up, run:

./artisan up

Version History

v1.1.1 -- Switched to simply take down the application if sync queue specified.

v1.1.0 -- Requires Laravel v4.2.5, and uses the ./artisan queue:restart command to trigger a daemon worker restart.

v1.0.0 -- Laravel v4.2.0+, using a manual die(); on the worker when the application comes back up.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-06-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固