PHPackages                             fk/queue - 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. fk/queue

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

fk/queue
========

PHP based queue execution program

v2.0.0(8y ago)031MITPHPPHP &gt;=7.0

Since Nov 30Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Yelfive/fk-quque)[ Packagist](https://packagist.org/packages/fk/queue)[ RSS](/packages/fk-queue/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Yii2 extension
--------------

[](#yii2-extension)

Extension can work as yii extension too

1. register as a component

```
# main.php
return [
    'components' => [
        'queue' => [
            'class' => 'fk\queue\wrapper\yii2\Connection',
            'logPath' => '@console/runtime/logs/queue.log',
            'engine' => 'fk\queue\engines\Redis',
        ]
    ]
]
```

2. queue in

```
Yii::$app->queue->in('ls -l'); // bash> ls -l
Yii::$app->queue->in(new YiiCommand(['migrate'])); // bash> php yii migrate
```

You can write your own `XXCommand` to parse a command, but in the end, a bash command should be returned If the argument for `in` is empty, then the cmd will be ignored

3. map of console

```
# console\config\main.php
return [
    'controllerMap' => [
        'queue' => [
            'class' => 'fk\queue\wrapper\yii2\QueueController'
        ]
    ],
]
```

5. queue start

```
php yii queue/start
```

---

Command
-------

[](#command)

Writing your own command by extends `\fk\queue\commands\Command` and overwrite method `CommandInterface::parse`

```
