PHPackages                             wayhood/yii2-asynctask - 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. wayhood/yii2-asynctask

ActiveYii2-extension[Queues &amp; Workers](/categories/queues)

wayhood/yii2-asynctask
======================

a queue extension using redis for yii2

144902[1 issues](https://github.com/wayhood/yii2-asynctask/issues)PHP

Since Aug 11Pushed 9y ago3 watchersCompare

[ Source](https://github.com/wayhood/yii2-asynctask)[ Packagist](https://packagist.org/packages/wayhood/yii2-asynctask)[ RSS](/packages/wayhood-yii2-asynctask/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Async Task module for Yii2
==========================

[](#async-task-module-for-yii2)

a async task process module using redis for yii2

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist wayhood/yii2-asynctask "*"

```

or add

```
"wayhood/yii2-asynctask": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

To use this module in a web application. simply add the following code in your application configuration:

```
reutrn [
    'bootstrap' => [..., 'asynctask'],
    'modules' => [
        'asynctask' => [
            'class' => 'wh\asynctask\Module',
            'redis' => 'redis' /* or [
            	'class' => 'yii\redis\Connection',
            	'hostname' => 'localhost',
            	'port' => 6379,
            	'database' => 0,
            ]*/
        ]
    ],
    ...
];
```

To use this module in a console application. like to web application

run

```
./yii asynctask "a, b, c"
```

a, b and c was queue name.

CREATE WORKER FILE

```
