2017 © Pedro Peláez
 

library php-resque-pause

php-resque-pause is a PHP port of resque-pause, which adds support for pausing / unpausing Resque jobs.

image

bigcommerce/php-resque-pause

php-resque-pause is a PHP port of resque-pause, which adds support for pausing / unpausing Resque jobs.

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 9 Versions
  • 6 % Grown

The README.md

PHP Resque Pause Build Status

A PHP-Resque plugin., (*1)

resque-pause adds functionality to pause resque jobs, (*2)

Using a pause allows you to stop the worker without stop the enqueue, (*3)

For further information re: php-resque, visit this official repo: http://github.com/chrisboulton/php-resque, (*4)

Requirements

  • PHP 5.3+
  • Redis 2.2+
  • Composer

Getting Started

resque-pause is installed via composer. To install:, (*5)

$ # Add php-resque-pause to your project's composer.json
$ composer require "bigcommerce/php-resque-pause"
$ # Install composer dependencies
$ composer install

Usage

To use Resque Pause in your application you'll need to create a globally used instance, we use Pimple but you can use globals, a static variable, or whatever else you like. Upon instantiation Pause will add a Resque listener to make sure that any jobs pushed to a paused queue will be paused as well. On destruction Pause will remove said listener., (*6)

// Let's put it in a global since that's easy/familiar
$GLOBALS['ResquePause'] = new \Resque\Plugins\Pause(); // Your enqueues are now being listened to

Pause it!

$GLOBALS['ResquePause']->pause('My_Queue');

Resume it!

$GLOBALS['ResquePause']->resume('My_Queue');

Is it Paused?

$GLOBALS['ResquePause']->isPaused('My_Queue');

Contributing

This repo is fairly thoroughly tested so please add tests for any feature you add. We use PSR-4 conventions and have a linter in place. To run the linter simply run composer lint and to run the tests locally run composer test. To have your code reviewed please tag @bigcommerce-labs/tools., (*7)

The Versions

29/09 2016

dev-master

9999999-dev

php-resque-pause is a PHP port of resque-pause, which adds support for pausing / unpausing Resque jobs.

  Sources   Download

The Requires

 

The Development Requires

by The Bigcommerce tooling team

29/09 2016

0.3.1

0.3.1.0

php-resque-pause is a PHP port of resque-pause, which adds support for pausing / unpausing Resque jobs.

  Sources   Download

The Requires

 

The Development Requires

by The Bigcommerce tooling team

22/06 2015

0.3.0

0.3.0.0

php-resque-pause is a PHP port of resque-pause, which adds support for pausing / unpausing Resque jobs.

  Sources   Download

The Requires

 

The Development Requires

by The Bigcommerce tooling team

22/05 2015

0.2.1

0.2.1.0

php-resque-pause is a PHP port of resque-pause, which adds support for pausing / unpausing Resque jobs.

  Sources   Download

The Requires

 

The Development Requires

by Wedy Chainy

08/04 2015

0.1.1

0.1.1.0

php-resque-pause is a PHP port of resque-pause, which adds support for pausing / unpausing Resque jobs.

  Sources   Download

The Requires

 

The Development Requires

by Wedy Chainy

08/04 2015

0.2.0

0.2.0.0

php-resque-pause is a PHP port of resque-pause, which adds support for pausing / unpausing Resque jobs.

  Sources   Download

The Requires

 

The Development Requires

by Wedy Chainy

12/03 2015

0.1.0

0.1.0.0

php-resque-pause is a PHP port of resque-pause, which adds support for pausing / unpausing Resque jobs.

  Sources   Download

The Requires

 

The Development Requires

by Wedy Chainy

11/03 2015

dev-final-test-for-before-enqueue

dev-final-test-for-before-enqueue

php-resque-pause is a PHP port of resque-pause, which adds support for pausing / unpausing Resque jobs.

  Sources   Download

The Requires

 

The Development Requires

by Wedy Chainy

22/09 2014

dev-phpunit-case-sensitive

dev-phpunit-case-sensitive

php-resque-pause is a PHP port of resque-pause, which adds support for pausing / unpausing jobs to Resque.

  Sources   Download

The Requires

 

The Development Requires

by Wedy Chainy