Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Terentev committed Apr 6, 2016
2 parents 4504247 + d13dcb0 commit 7dbe7e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,11 @@ then run console command to listen queue:
```
php yii queue-bus/listen some-queue-name
```
Create background command:
Create and handle command
```php
class HeavyComputationsCommand extends Object implements QueuedCommand
{
use QueuedCommandTrait;
public $queueName = 'you-can-change-queue-name-here';
public $delay = 5; // Command will be delayed for 5 seconds
}
Expand Down Expand Up @@ -192,4 +193,4 @@ class SomeCommand implements SelfHandlingCommand
}

$command = Yii::$app->commandBus->handle($command);
```
```

0 comments on commit 7dbe7e8

Please sign in to comment.