From bdcab506423ee9b28083865f66c01caceabfde27 Mon Sep 17 00:00:00 2001 From: Maksim Kotlyar Date: Wed, 16 Aug 2017 13:03:57 +0300 Subject: [PATCH] update deps. make it work with enqueue 0.7 --- composer.json | 4 ++-- docs/parallel-execution-with-enqueue.md | 4 ++-- src/Enqueue/AsyncTransition.php | 2 +- src/Enqueue/HandleAsyncTransitionProcessor.php | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 63bde33..a115540 100644 --- a/composer.json +++ b/composer.json @@ -20,11 +20,11 @@ "php": "^7", "makasim/values": "@dev", "symfony/console": "^3.1", - "graphp/graphviz": "^0.2.1", "ramsey/uuid": "^3" }, "suggest": { - "enqueue/enqueue": "Install the Enqueue library to be able to process tasks async (by using MQ).", + "enqueue/enqueue": "^0.7 Install the Enqueue library to be able to process tasks async (by using MQ).", + "graphp/graphviz": "^0.2 If you want to visualize graphs", "makasim/yadm": "Install the Yadm library to be able to persist store in MongoDB" }, "extra": { diff --git a/docs/parallel-execution-with-enqueue.md b/docs/parallel-execution-with-enqueue.md index 3519aa0..7670c59 100644 --- a/docs/parallel-execution-with-enqueue.md +++ b/docs/parallel-execution-with-enqueue.md @@ -98,8 +98,8 @@ use Formapro\Pvm\ProcessEngine; use Formapro\Pvm\ProcessStorage; use Enqueue\SimpleClient\SimpleClient; use Formapro\Pvm\Enqueue\HandleAsyncTransitionProcessor; -use Enqueue\Psr\PsrMessage; -use Enqueue\Psr\PsrContext; +use Interop\Queue\PsrMessage; +use Interop\Queue\PsrContext; use Enqueue\Client\Config; include __DIR__.'/config.php'; diff --git a/src/Enqueue/AsyncTransition.php b/src/Enqueue/AsyncTransition.php index 8859eb7..c79b52e 100644 --- a/src/Enqueue/AsyncTransition.php +++ b/src/Enqueue/AsyncTransition.php @@ -27,7 +27,7 @@ public function transition(array $tokens) foreach ($tokens as $token) { /** @var Token $token */ - $this->producer->send(HandleAsyncTransitionProcessor::TOPIC, [ + $this->producer->sendCommand(HandleAsyncTransitionProcessor::COMMAND, [ 'process' => $token->getProcess()->getId(), 'token' => $token->getId(), ]); diff --git a/src/Enqueue/HandleAsyncTransitionProcessor.php b/src/Enqueue/HandleAsyncTransitionProcessor.php index 03b108a..290b70c 100644 --- a/src/Enqueue/HandleAsyncTransitionProcessor.php +++ b/src/Enqueue/HandleAsyncTransitionProcessor.php @@ -4,9 +4,9 @@ use Enqueue\Client\CommandSubscriberInterface; use Enqueue\Consumption\QueueSubscriberInterface; use Enqueue\Consumption\Result; -use Enqueue\Psr\PsrContext; -use Enqueue\Psr\PsrMessage; -use Enqueue\Psr\PsrProcessor; +use Interop\Queue\PsrContext; +use Interop\Queue\PsrMessage; +use Interop\Queue\PsrProcessor; use Enqueue\Util\JSON; use Formapro\Pvm\Process; use Formapro\Pvm\ProcessEngine;