{"id":19312131,"url":"https://github.com/bigcommerce/php-resque-pause","last_synced_at":"2025-04-22T15:31:59.186Z","repository":{"id":20939553,"uuid":"24227898","full_name":"bigcommerce/php-resque-pause","owner":"bigcommerce","description":"An addon for php-resque, php-resque-pause adds functionality to pause resque jobs.","archived":false,"fork":false,"pushed_at":"2016-09-29T05:35:30.000Z","size":30,"stargazers_count":5,"open_issues_count":0,"forks_count":9,"subscribers_count":87,"default_branch":"master","last_synced_at":"2024-09-15T18:55:22.317Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bigcommerce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-19T11:46:55.000Z","updated_at":"2020-10-16T16:14:13.000Z","dependencies_parsed_at":"2022-08-05T11:00:32.496Z","dependency_job_id":null,"html_url":"https://github.com/bigcommerce/php-resque-pause","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fphp-resque-pause","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fphp-resque-pause/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fphp-resque-pause/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fphp-resque-pause/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bigcommerce","download_url":"https://codeload.github.com/bigcommerce/php-resque-pause/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223900371,"owners_count":17222028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T00:32:59.847Z","updated_at":"2024-11-10T00:32:59.965Z","avatar_url":"https://github.com/bigcommerce.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"PHP Resque Pause [![Build Status](https://travis-ci.org/bigcommerce/php-resque-pause.svg?branch=master)](https://travis-ci.org/bigcommerce/php-resque-pause)\n==================================\n\nA [PHP-Resque](http://github.com/chrisboulton/php-resque) plugin.\n\nresque-pause adds functionality to pause resque jobs\n\nUsing a pause allows you to stop the worker without stop the enqueue\n\nFor further information re: php-resque, visit this official repo: \u003chttp://github.com/chrisboulton/php-resque\u003e\n\n## Requirements ##\n* PHP 5.3+\n* Redis 2.2+\n* Composer\n\n## Getting Started ##\nresque-pause is installed via composer. To install:\n\n```bash\n$ # Add php-resque-pause to your project's composer.json\n$ composer require \"bigcommerce/php-resque-pause\"\n$ # Install composer dependencies\n$ composer install\n```\n\n## Usage ##\n\nTo use Resque Pause in your application you'll need to create a globally used instance, we use Pimple but you can use\nglobals, a static variable, or whatever else you like. Upon instantiation `Pause` will add a Resque listener to make\nsure that any jobs pushed to a paused queue will be paused as well. On destruction `Pause` will remove said listener.\n\n```php\n// Let's put it in a global since that's easy/familiar\n$GLOBALS['ResquePause'] = new \\Resque\\Plugins\\Pause(); // Your enqueues are now being listened to\n```\n\n### Pause it! ###\n```php\n$GLOBALS['ResquePause']-\u003epause('My_Queue');\n```\n\n### Resume it! ###\n```php\n$GLOBALS['ResquePause']-\u003eresume('My_Queue');\n```\n\n### Is it Paused? ###\n```php\n$GLOBALS['ResquePause']-\u003eisPaused('My_Queue');\n```\n\n## Contributing ##\n\nThis repo is fairly thoroughly tested so please add tests for any feature you add. We use PSR-4 conventions and have a\nlinter in place. To run the linter simply run `composer lint` and to run the tests locally run `composer test`. To have\nyour code reviewed please tag @bigcommerce-labs/tools.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigcommerce%2Fphp-resque-pause","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbigcommerce%2Fphp-resque-pause","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigcommerce%2Fphp-resque-pause/lists"}