From d13dcb06ec3411d9eb5c1f9559e832126db4f62e Mon Sep 17 00:00:00 2001 From: Eugene Terentev Date: Wed, 6 Apr 2016 11:00:49 +0300 Subject: [PATCH] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0edbed0..541ad47 100644 --- a/README.md +++ b/README.md @@ -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 } @@ -192,4 +193,4 @@ class SomeCommand implements SelfHandlingCommand } $command = Yii::$app->commandBus->handle($command); -``` \ No newline at end of file +```