PHPackages                             ga/resque - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. ga/resque

ActiveLibrary[Queues &amp; Workers](/categories/queues)

ga/resque
=========

yii2-resque

21281PHP

Since Feb 16Pushed 9y ago1 watchersCompare

[ Source](https://github.com/liuzexin/GAResque)[ Packagist](https://packagist.org/packages/ga/resque)[ RSS](/packages/ga-resque/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

\#Yii2-resque(best,easy) ##Install You need to use composer Primarily, You need to add the following code to**root package(project directory)**, because the newest php-resque is dev-master, the tagged version is oldest.

```
{
    "require":{
        ...
        "chrisboulton/php-resque": "@dev"
    }
}
```

Then run:

```
composer require ga/resque dev-master
```

\##Set up

\###For Yii2-basic

1.Copy the `ResqueController.txt` to command directory and renamed `ResqueController.php`, and then modify the namespace to `app\commands`.

2.Modify console.php in config directory, add the following code.

```
   'resque' => [
       'class' => 'ga\resque\GAResque',
       'server' => '127.0.0.1',     // Redis server address
       'port' => '6379',            // Redis server port
       'database' => 0,             // Redis database number
   ],
```

3.Create `*Job.php` in models directory.

example:

```
MyJob.php
