{"id":22367484,"url":"https://github.com/mikesmullin/cakephp-php-resque-plugin","last_synced_at":"2025-07-30T17:33:00.312Z","repository":{"id":1530427,"uuid":"1812824","full_name":"mikesmullin/CakePHP-PHP-Resque-Plugin","owner":"mikesmullin","description":"CakePHP PHP-Resque Plugin","archived":false,"fork":false,"pushed_at":"2011-08-28T22:45:40.000Z","size":185,"stargazers_count":7,"open_issues_count":4,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T14:50:55.007Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikesmullin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-05-28T02:41:32.000Z","updated_at":"2023-01-01T14:02:58.000Z","dependencies_parsed_at":"2022-07-12T14:55:32.501Z","dependency_job_id":null,"html_url":"https://github.com/mikesmullin/CakePHP-PHP-Resque-Plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikesmullin%2FCakePHP-PHP-Resque-Plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikesmullin%2FCakePHP-PHP-Resque-Plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikesmullin%2FCakePHP-PHP-Resque-Plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikesmullin%2FCakePHP-PHP-Resque-Plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikesmullin","download_url":"https://codeload.github.com/mikesmullin/CakePHP-PHP-Resque-Plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228164482,"owners_count":17879085,"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-12-04T18:18:22.846Z","updated_at":"2024-12-04T18:18:23.470Z","avatar_url":"https://github.com/mikesmullin.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"CakePHP PHP-Resque Plugin by Mike Smullin \u003cmike@smullindesign.com\u003e\n============\n\n** Lets you use Resque within the CakePHP environment, complete with cake shell. **\n\nInstallation \u0026 Usage\n------------\n\nPlace this directory in your plugins dir:\n\n    git submodule add git://github.com/mikesmullin/CakePHP-PHP-Resque-Plugin.git ./app/plugins/resque/\n\nDownload the latest version of Chris Boulton's php-resque into `./app/plugins/resque/vendors/php-resque/`, as well:\n\n    git submodule update --init --recursive\n\nEdit the file `./app/plugins/resque/config/resque.php` and remember to\nconfigure whatever Resque.Redis.host and port are appropriate for your environment:\n\n    switch (Configure::read('YourApp.environment')) {\n\n    $config['Resque']['Redis'] = array(\n      'host' =\u003e 'localhost',\n      'port' =\u003e 6379\n    );\n\nThen launch a new php-resque-worker fork, which will begin polling the master\nResque server for new jobs to run locally:\n\n    cake resque help # to see available options\n    cake resque start\n\nHow to Queue a Job\n------------\n\n    var $components = array('Resque.Resque');\n\n    function action() {\n      Resque::enqueue('default', 'YourJobClass1', array($any, $params)); // queue it up\n    }\n\nor you can use the CakePHP Shell:\n\n    cake resque jobs # to see a list of available jobs\n    cake resque enqueue YourJobClass1 any other params\n\nHow to Write a Job\n------------\n\nin the above example it would be a file saved as:\n\n    ./app/vendors/shells/jobs/your_job_class1.php\n\nand the code would look like:\n\n    class YourJobClass1 extends ResqueShell {\n      function perform() {\n        # CakePHP environment is within scope via ResqueShell base class and App::import()\n        $this-\u003eloadModel('User');\n        $users = $this-\u003eUser-\u003efind('all');\n        // ...\n        $this-\u003eout('Done');\n      }\n    }\n\nAND make sure to `cake resque restart` with each change to any of your job classes.\n\nCredits\n------------\n\nCakePHP-PHP-Resque is written by Mike Smullin and is released under the WTFPL.\n\nPHP-Resque is written by Chris Boulton see https://github.com/chrisboulton/php-resque\n\nBased on Resque by defunkt see https://github.com/defunkt/resque\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikesmullin%2Fcakephp-php-resque-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikesmullin%2Fcakephp-php-resque-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikesmullin%2Fcakephp-php-resque-plugin/lists"}