ffreitas-br/command-lock-bundle 问题修复 & 功能扩展

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

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

ffreitas-br/command-lock-bundle

Composer 安装命令:

composer require ffreitas-br/command-lock-bundle

包简介

Symfony bundle who create a lock in commands, avoiding the execution of same command simultaneously

README 文档

README

Build Status Dependency Status

This command-lock-bundle when installed prevents two or more of same command runs simultaneously.

Installation

To install command-lock-bundle you will need just a few minutes.

  1. Include the command-lock-bundle in the required section of composer.json.

composer.json

// ...
"require": {
    "ffreitas-br/command-lock-bundle": "dev-master",
},
// ...

After this run composer update or composer intall to refresh your dependencies.

  1. Register the bundle in your Kernel.

app/AppKernel.php

<?php

public function registerBundles()
{
    $bundles = array(
        // ...
        new FFreitasBr\CommandLockBundle\CommandLockBundle(),
    );
    // ...
}

  1. Configure the directory where the pid lock files will be stored.

app/config/config.yml

...

command_lock:
    pid_directory: "%kernel.root_dir%/data/command_pid_files"

...

Don't worry if you don't have the directories created yet, the bundle will take care of this for you.

  1. [OPTIONAL] Configure a list of exceptions.

app/config/config.yml

...

command_lock:
    exceptions:
        - cache:warmup
        - cache:clear

...

The commands listed in this configurations will be allowed to run simultaneously.

Now you have the command-lock-bundle installed and configured, it will now prevents two or more of same command runs simultaneously.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-02-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固